home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Periodicals
/
General
/
Mac Script
/
mac-script-94-04.txt
< prev
next >
Wrap
Text File
|
1994-06-09
|
579KB
|
14,012 lines
Subject: April MacScripting Digest
Date: Mon, 02 May 94 17:02:40 -0500
From: Fred Terry <pfterry@lks.csi.com>
This is the April digest of the MacScripting mailing list.
=========================================================================
Date: Thu, 31 Mar 1994 15:45:33 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Adam C. Engst" <ace@TIDBITS.COM>
Organization: TidBITS
Subject: Frontmost memory leak
Someone forwarded this to me - I can't vouch for it's accuracy, but
I thought I'd mention it so people could either say it's not true
or be aware of it...
cheers ... -Adam
# 3. I have found that when using the FrontMost editor (AppleScript 1.1) or
# running a droplet built using same, that 100k to 400k of system heap is used
# but not released when those appls are quit. We have tried it on Macs from
# the orig Mac II to an 840 AV, all running Sys 7.1 with the same results.
# Someone at SOS-APPl is looking into it, but while on the phone, he quietly
# admitted he is running Sys 7.5!
--
Adam C. Engst, TidBITS Editor -- ace@tidbits.com -- info@tidbits.com
Author of The Internet Starter Kit for Macintosh -- tisk@tidbits.com
=========================================================================
Date: Fri, 1 Apr 1994 08:21:58 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Ronald J. Logsdon" <RJ@SHEBUTE.COM>
Subject: UNSUBSCRIBE APPLESCRIPT
UNSUBSCRIBE APPLESCRIPT rj@shebute.com
Ronald J. Logsdon
Shebute'
http://Shebute.com/Humans/RJ_Logsdon.HTML
=========================================================================
Date: Fri, 1 Apr 1994 08:30:54 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
Subject: MS: One More Time
We've had to unsub attempts to the main list in as many days, so it is time
to send this out again. Please retain this for your records and refer to it
when you need to change your status on the list.
For the record, the list name is "MACSCRPT" and should be addressed as such
to "Listserv@dartmouth.edu" rather than to this list or to the request list
(the latter of which should be used when you need to speak to a human
administrator of this list when something goes wrong with the listserv
program itself).
The relevent addresses you need to know are as follows:
* LISTSERV@dartmouth.edu
the master controller. Mail is handled by computer
so you have a limited set of commands you can send it.
(Sending the HELP command will get you basics on this
including instructions on how to sign off the list and
set basic options for yourself like whether you want to
receive the list in digest format or not)
* MacScripting-Request@dartmouth.edu
Fred Terry and Andy J. Williams, the list administrators.
We can be contacted when you have a problem with the LISTSERV
program above or when you have any administrative questions.
* MacScripting@dartmouth.edu
the distribution list. Mail sent here goes to
all the recipients.
If you have ANY questions at all please contact us at
MacScripting-Request@dartmouth.edu.
-A
=========================================================================
Date: Fri, 1 Apr 1994 07:49:53 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stewart-CIC-IS <Stewart-CIC-IS%micmac@REDSTONE-EMH2.ARMY.MIL>
Subject: Re: Hypercard won't save
Hi! I've been lurking for a couple of weeks, and know nothing about
AppleScript. But I saw a similar message on the HC listserver--so I'm
cross-posting their answer. (Is that illegal? ;-)
>"Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU> asks:
>As an aside, HCv2.2 SAYS it can build stand-alone applications from system
>7, and all the blurb's in the manual, and I even get SOME of the stuff they
>say when I try to "Save a Copy", but I DON'T get the pop-up list of
>File-Types as the manual states. I'm using system 7.1 (which I would HOPE
>would be backwardly compatible with system 7????) Any takers? Or should I
>post this question on the HC listserver?
>From yesterday's HC listserver--->
>I have a problem with creating a standalone version of a HyperCard 2.2 stack.
>It has been noted that to do this you need to choose 'Save a Copy' from the
>File menu, and a pop-up menu of File-Type should then enable you to save it is
>a StandAlone.
>
>The problem is that when I do this, there is no pop-up menu, just a field
>indicating that it is saving it as File-Type : Stack.
>
>The book says that this requires systems 7.
>I am using system 7.1 on a Centris 660AV. I have also tried this on a LCIII
>and a Quadra 800 with the same result.
>
>Has anyone had a similar problem, or have I missed a simple step somewhere.
>
Their answer-->
>Yes, Mike, I had the same problem. Move the translators to the systems file
>and make sure applescript is in the HC directory. Then you will get the
proper
>dialog box. But be prepared: standalone stacks are huge. Sample: one of my
>stacks went from 24K to 800K.
>Regards, STan Sulkes
>sulkes@ucbeh.san.uc.edu
I don't deserve any credit for this answer. :-) Good Luck!
Marcus
stewart-cic-is@redstone-emh2.army.mil
=========================================================================
Date: Fri, 1 Apr 1994 08:53:15 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: K J Fox <kjfox@MKE.AB.COM>
Subject: Re: Frontmost memory leak
># 3. I have found that when using the FrontMost editor (AppleScript 1.1) or
># running a droplet built using same, that 100k to 400k of system heap is used
># but not released when those appls are quit. We have tried it on Macs from
># the orig Mac II to an 840 AV, all running Sys 7.1 with the same results.
># Someone at SOS-APPl is looking into it, but while on the phone, he quietly
># admitted he is running Sys 7.5!
>
Regarding the memory leak with FrontMost... I've written one application
with it and did some recent checking. It appears that each successive
launch of the application grabs another 100-300K of memory by the System as
shown in the "About This Macintosh..." box. I'm not sure of a good way to
see the specific size of my system heap though (any ideas??) At the start,
my System was at 4900K and after about 7 launches, it ballooned to 6500K.
No other apps were launched. I guess it's time to reboot!
kjf
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Kenneth J. Fox
Rockwell Automation - Allen Bradley Co.
Milwaukee, WI (414)382-3287
kjfox@mke.ab.com
=========================================================================
Date: Fri, 1 Apr 1994 06:57:00 PST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: Applescript 1.1 upgrade: Worth it?
>Sorry if I you talked about this earlier and I missed it.... I bought the
>AppleScript Developer's Toolkit 1.0 from APDA back in December. Price was
>$199. I just called them and they said the upgrade to version 1.1 is $99.
>That seems a bit much for an incremental upgrade! What are the new
>features in 1.1? Is it worth it?
Well, AS 1.1 is certainly much improved over 1.0. Its faster, and it seems
more stable. The other item you get with the upgrade to the Developers Kit
is Frontmost, an AppleScript based interface builder. All the other
elements of the package (example code and utilities) are pretty much
unchanged.
-Mark
=========================================================================
Date: Fri, 1 Apr 1994 09:03:19 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Frontmost memory leak
In-Reply-To: Your message of "Fri, 01 Apr 94 08:53:15 CST"
>
>Regarding the memory leak with FrontMost... I've written one application
>with it and did some recent checking. It appears that each successive
>launch of the application grabs another 100-300K of memory by the System as
>shown in the "About This Macintosh..." box. I'm not sure of a good way to
>see the specific size of my system heap though (any ideas??) At the start,
>my System was at 4900K and after about 7 launches, it ballooned to 6500K.
>No other apps were launched. I guess it's time to reboot!
Wouldn't ZoneRanger work for this. If my memory isn't completely gone, you
should be able to examine the individual blocks.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Fri, 1 Apr 1994 09:41:44 PST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Lawrence Wood <lawrencw@MICROSOFT.COM>
Subject: Re: Example Excel AppleScripts?
Hi,
There should be excel examples on gaea but I'll have to look
to make sure. If
not I really dont know where to find any examples. As for the Excel
SDK (which the
manual refers to) is very AppleEvent oriented, but, AppleEvents and
AppleScript are
VERY closely tied together. Really the only way I know to learn about
Excel3&4 is to
open the application's dictionary and use what it shows. Since all you
can really do
is get or set things it's not too bad. You can also 1. Evaluate
formulas, 2. Execute a
macro command, 3. Execute an entire macro. Good luck.
lw
**********************************************************************
*****************************
#include<stddisclaimer.h> These are my ramblings and do not represent my
employer, etc.
**********************************************************************
*****************************
----------
From: Stephen Jonke <netmail!jonke@GSFC.NASA.GOV>
To: Multiple recipients of list MACSCRPT <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
Subject: Example Excel AppleScripts?
Date: 29 Mar, 94 5:03PM
Does anyone have any examples of AppleScripting Excel that I could look at?
I looked on gaea, but there were no Excel AppleScripts there. Also, are
there any guides available for AppleScripting Excel? The document
mentioned in the Excel manual seems to be oriented toward AppleEvents, as
opposed to AppleScript (i.e. low level).
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Fri, 1 Apr 1994 15:42:13 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jamie Lawrence <jamiel@SYBASE.COM>
Subject: scripting MS Excel
Does anyone wanna give a poor, frustrated excel-scripting wannabe some
example script they have laying around to send and recieve data using
Excel? I can't seem to find the proper syntax to get anything back and
forth. Through a macro I could make sure the particular data in question
could be selected (even though I want to be able to get more complex data
later), but I can't even use this because the script editor won't accept
the class 'selection-object', which I found in Excel's dictionary. It
thinks I mean selection minus object.
Help please?
thanks-
jamie
=========================================================================
Date: Fri, 1 Apr 1994 15:58:51 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: scripting MS Excel
At 15:42 4/1/94 -0800, Jamie Lawrence wrote:
>Does anyone wanna give a poor, frustrated excel-scripting wannabe some
>example script they have laying around to send and recieve data using
>Excel? I can't seem to find the proper syntax to get anything back and
>forth. Through a macro I could make sure the particular data in question
>could be selected (even though I want to be able to get more complex data
>later), but I can't even use this because the script editor won't accept
>the class 'selection-object', which I found in Excel's dictionary. It
>thinks I mean selection minus object.
tell application "Microsoft Excel"
set foo to selection
get value of foo
end tell
That returns the value of the currently selected cell. If the current
selection is a range of cells, you get a list, something like this one
(this is burn-before-reading secret data): {{"191.5"}, {"189.5"},
{"188.5"}, {"189.5"}, {"189"}, {"189.5"}, {"188.5"}, {"189.5"}, {"188.5"}}
You can do things like
set value of cell 1 of row 6 to -99
or, as above
set foo to selection
set value of foo to 120.5
[It shouldn't be necessary to have the intermediate variable, but it seems
to be.]
Hope these help. Keep trying...it really does work
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 1 Apr 1994 22:59:22 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Acid Jazz
Acid Jazz is an Application, but I believe that version 1.1v1 was already
on gaea, it is NOT new. the "Dial Number" script in my "matt's Scripts"
uses Acid Jazz.
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Sat, 2 Apr 1994 12:22:11 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: sending raw appleevents
OK, I know how to send a raw appleEvent to an application, such
as the finder. my question is this: I have an application that claims
to support AppleEvents, but it isn't appleScriptable. how do i
figure out the AppleEvents that it supports. I looked at it in ResEdit
but didn't find anything obvious.
thanx mucho!
ps. the app I am trying to do this with is "FilePlayer 2.0" but there are
other apps I would like to send appleEvents to also.
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Sat, 2 Apr 1994 10:14:11 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: sending raw appleevents
In-Reply-To: <199404021809.KAA04289@mail.netcom.com> from "Matthew Ahrens" at
Apr 2, 94 12:22:11 pm
>
> OK, I know how to send a raw appleEvent to an application, such
> as the finder. my question is this: I have an application that claims
> to support AppleEvents, but it isn't appleScriptable. how do i
> figure out the AppleEvents that it supports. I looked at it in ResEdit
> but didn't find anything obvious.
Get the AEHandler FKEY (it's on the AppleScript & various developer CDs). It
will display all of the current application & system AppleEvent and Coercion
handlers. Unfortunately, some applications just install handlers for an entire
class or even '****', so it won't tell much in that case.
--
Mike Cohen | "Software that means business"
ISIS International |
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
=========================================================================
Date: Sat, 2 Apr 1994 10:31:32 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: sending raw appleevents
At 12:22 4/2/94 -0500, Matthew Ahrens wrote:
>OK, I know how to send a raw appleEvent to an application, such
>as the finder. my question is this: I have an application that claims
>to support AppleEvents, but it isn't appleScriptable. how do i
>figure out the AppleEvents that it supports. I looked at it in ResEdit
>but didn't find anything obvious.
You can't learn everything without the cooperation of the developer of the
application. [The easiest way to find out is to be told.]
Barring that, until recently the Developer CDs had a little FKEY which puts
up a window showing every AE-related handler installed by the front-most
application, and every installed System-level handler. Warning...this FKEY
crashes when sufficiently-new Finder versions are in front...7.1.3 is
sufficiently new. This could well be why the FKEY disappeared.
[You can, if you are very patient, use the FKEY to lead you to the
handlers, and MacsBug or whatever to disassemble them, so in principle you
can learn everything there is to learn about the application's AE support.
It would be easier to write your own application. The FKEY can also be
used to remove handlers, and exercise them, although I haven't tried
either.]
Note that some applications install a wildcard handler: class '****', id
'****'. Any event not dispatched to something more specific goes there.
[Frontier does that, and has a table (system.verbs.traps) into which one
can put a subtable for a class ('misc' is in the as-shipped Frontier). The
tables contain scripts which are named for the event id (the 'misc' table
ships with 'dosc'). [Meaning one can customize Frontier to accept many
different events.]
So just seeing all the posted handlers doesn't necessarily tell you what
events an application handles. It also doesn't tell you anything about
what the parameters are for non-standard events (or whether the parameters
for standard events are standard).
--JOhn
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sat, 2 Apr 1994 19:30:27 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: coercing file references to anything
i can't seem to coerce a file reference to anyhting else. for example,
(file "Duo-Gnosis:test") as string
or
(file "Duo-Gnosis:test") as alias
or
alias (file "Duo-Gnosis:test")
result in an error: Can't get file "File "Duo-Gnosis:test"
I am using AppleScript 1.0, if it matters.
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Sat, 2 Apr 1994 19:31:15 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: posting AppleScript Extension
would someone with the AppleScript Developer's Kit ver 1.1 be so
kind as to post the applescript extension 1.1 on gaea or info-mac?
I believe that if you read the liscence, you can distribute the
extension to anyone.
on a side issue, are there any changes in the Script Editor from ver
1.0 to 1.1
(I have AS 1.0, which I got with TAO of applescript. does anyone know
if they are offoring an upgrade to AS 1.1?)
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Sat, 2 Apr 1994 20:21:50 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "William J. Jamison" <jami1@AOL.COM>
Subject: Re: Frontmost memory leak
">Regarding the memory leak with FrontMost... I've written one application
">with it and did some recent checking. It appears that each successive
">launch of the application grabs another 100-300K of memory by the System as
">shown in the "About This Macintosh..." box. I'm not sure of a good way to
">see the specific size of my system heap though (any ideas??) At the start,
">my System was at 4900K and after about 7 launches, it ballooned to 6500K.
">No other apps were launched. I guess it's time to reboot!
"Wouldn't ZoneRanger work for this. If my memory isn't completely gone, you
"should be able to examine the individual blocks.
"pf
You could also use NowMenus Memory View
Jami1
=========================================================================
Date: Sat, 2 Apr 1994 21:29:54 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: sending raw appleevents
>You can't learn everything without the cooperation of the developer of the
>application. [The easiest way to find out is to be told.]
This is the truth.
>Barring that, until recently the Developer CDs had a little FKEY which puts
>up a window showing every AE-related handler installed by the front-most
>application, and every installed System-level handler. Warning...this FKEY
>crashes when sufficiently-new Finder versions are in front...7.1.3 is
>sufficiently new. This could well be why the FKEY disappeared.
This is not. :)
I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
It probably got skipped because Ed didn't remember to resubmit it. That's
kind of an annoying bother, particularly if you write a lot of stuff, and
Ed Lai has.
>[You can, if you are very patient, use the FKEY to lead you to the
>handlers, and MacsBug or whatever to disassemble them, so in principle you
>can learn everything there is to learn about the application's AE support.
>It would be easier to write your own application. The FKEY can also be
>used to remove handlers, and exercise them, although I haven't tried
>either.]
This is probably what made you think it crashed. This FKEY throws you
rather unceremoniously into Macsbug (and probably TMON too, if I know Ed)
with a disassembly of the handler code that gets that event or coercion.
Nice for setting breakpoints. I just wish it knew about the osax machanism
and took me to the osax code itself instead of the osax loader code which
handles all the osax events.
I've never seen the AEInteraction FKEY crash, and I use it a lot. You can
find it on the AppleScript CD too.
Jon
=========================================================================
Date: Sun, 3 Apr 1994 08:20:03 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: sending raw appleevents
>>Barring that, until recently the Developer CDs had a little FKEY which puts
>>up a window showing every AE-related handler installed by the front-most
>>application, and every installed System-level handler. Warning...this FKEY
>>crashes when sufficiently-new Finder versions are in front...7.1.3 is
>>sufficiently new. This could well be why the FKEY disappeared.
>
>This is not. :)
Yes...last evening I noticed that the FKEY is back on the April Developer CD.
From one of the CDs where I looked for it, it was notable by its
absence: listed in the summary part of the documentation of the FKEY
collection, details ripped out of the document, and not in the folder with
the others. Since I noticed this after the FKEY started crashing for me, I
seem to have made a faulty assumption.
>
>I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
Here, ever since going to Finder 7.1.3, the FKEY crashed immediately upon
being called up with Finder in front. So I gave up trying.
After experiment: the FKEY is fine on "Zeus", the 8100. It still crashes
on the IIci (clever name: "JWB"). Bus error at ... while fetching
instructions from 5C44B854 and 5C44B856 (not surprising that it can't do
that).
I guess it's time to reinstall some things on the IIci.
Thanks for the correction [again]. --John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 4 Apr 1994 01:21:18 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Sean Elfstrom <selfstro@ENGR.TRINITY.EDU>
Subject: -108 and -1752 errors
What causes these errors when I try to run a script from the Finder
using OSAMenu? I have Sys 7.1 and AppleScript 1.0. If I'm in another
app, and try to run the same scripts, it generally works, but since
I'm trying to work with Finder Selections via Jon's Commands, I'd
like for it to work in the Finder as well.
--
---------------------------------------------------------------------
Sean Elfstrom | Trinity University
selfstro@cs.trinity.edu | 715 Stadium Dr. #707
NeXTMail: selfstro@oberon.cs.trinity.edu | San Antonio, TX 78212-7200
=========================================================================
Date: Sun, 3 Apr 1994 16:16:36 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Adam C. Engst" <ace@TIDBITS.COM>
Organization: TidBITS
Subject: FrontMost memory leak
The latest word on the FrontMost memory leak...
cheers ... -Adam
> I finally heard from Apple (SOS-APPL) after a couple of weeks and a
> little prodding. This concerned the problem I mentioned about memory losses
> when using the FrontMost portion of AppleScript.
>
> Apple confirmed the bug that eats up 100k to 400k after each FrontMost
> execution. They are looking into it, and so don't know if or when they will
> have a solution. They also don't know how a solution might come -- in a
> patch or wait for a release.
>
> Rick Hyman
--
Adam C. Engst, TidBITS Editor -- ace@tidbits.com -- info@tidbits.com
Author of The Internet Starter Kit for Macintosh -- tisk@tidbits.com
=========================================================================
Date: Mon, 4 Apr 1994 09:46:51 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Example Excel AppleScripts?
In-Reply-To: Your message of "Fri, 01 Apr 94 09:41:44 PST"
>There should be excel examples on gaea but I'll have to look
>to make sure. If
>not I really dont know where to find any examples. As for the Excel
>SDK (which the
>manual refers to) is very AppleEvent oriented, but, AppleEvents and
>AppleScript are
>VERY closely tied together. Really the only way I know to learn about
>Excel3&4 is to
>open the application's dictionary and use what it shows. Since all you
>can really do
>is get or set things it's not too bad. You can also 1. Evaluate
>formulas, 2. Execute a
>macro command, 3. Execute an entire macro. Good luck.
I haven't put any out there, but there are some on one of the AppleScript CDs.
I'm trying to find out if I can put them on gaea with the FileMaker ones. If
not, you could always find someone with the CD (think it was the beta one).
You might want to look at
ftp://gaea.kgs.ukans.edu/applescript/docs/xldoc.hqx
I'll keep you posted on my progress with the examples.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
"Bad spellers of the world, untie!"
--Graffito
=========================================================================
Date: Mon, 4 Apr 1994 08:37:09 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: -108 and -1752 errors
At 01:21 4/4/94 -0500, Sean Elfstrom wrote:
>What causes these errors when I try to run a script from the Finder
>using OSAMenu? I have Sys 7.1 and AppleScript 1.0.
Things might go better with AppleScript 1.1, but that's not a full
solution. Try giving Finder more memory, which isn't easy since Finder
won't do it in the usual way (via the Get Info box).
If you only have one startup volume prepared, make a copy of Finder by
dragging its icon to another folder while holding down the option key.
Using ResEdit or one of the others, modify the SIZE -1 resource. Add
100,000 or so to the second size box in that resource (shown in decimal
bytes by ResEdit, other editors may differ). Quit ResEdit or whatever.
Drag the Finder out of the System Folder (to Trash is OK). Drag your
modified Finder into the System folder. Restart.
If you have two startup volumes available, restart from the other one,
change the Finder on your regular one, and restart from your regular
startup volume.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 4 Apr 1994 09:23:32 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: coercing file references to anything
>i can't seem to coerce a file reference to anyhting else. for example,
>
>(file "Duo-Gnosis:test") as string
>or
>(file "Duo-Gnosis:test") as alias
>or
>alias (file "Duo-Gnosis:test")
>
Your problem is that the use of the word "file" is ALSO a coercion
so that you are forcing a double coercion. Try the following:
{alias "HD:Test"}
{file "HD:Test"}
("HD:Test" as string)
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Mon, 4 Apr 1994 09:29:10 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: -108 and -1752 errors
>What causes these errors when I try to run a script from the Finder
>using OSAMenu? I have Sys 7.1 and AppleScript 1.0.
>
Well, the -108 is a bug I know about in OSAMenu 1.0 and will be
fixed in 1.0.1, when I get a chance to release it...The -1752 is new to
me...
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Mon, 4 Apr 1994 11:20:12 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: coercing file references to anything
>i can't seem to coerce a file reference to anyhting else. for example,
>
>(file "Duo-Gnosis:test") as string
>or
>(file "Duo-Gnosis:test") as alias
>or
>alias (file "Duo-Gnosis:test")
This is the same problem I have been running into with the Jons Commands
osax. There is a command called "finder selection" that returns a list
with format like {file "Mac:folder:file"}. The problem is that if I want
to use "finder selection" in a script, I can't coerce the result into a
string. I get an error if I use any of the following:
set theFile to item 1 of finder selection
return (theFile as string) <--- error
Jon Pugh who wrote the osax says that he has no problem coercing it into
a string, using Applescript 1.1. I'm using Applescript 1.0. maybe that's
the culprit.
-Dave
=========================================================================
Date: Mon, 4 Apr 1994 13:18:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: sending raw appleevents
At 21:29 4/2/94 -0800, Jon Pugh wrote:
[quoting me]
>>Barring that, until recently the Developer CDs had a little FKEY which puts
>>up a window showing every AE-related handler installed by the front-most
>>application, and every installed System-level handler. Warning...this FKEY
>>crashes when sufficiently-new Finder versions are in front...7.1.3 is
>>sufficiently new. This could well be why the FKEY disappeared.
>
>This is not. :)
>
>I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
>It probably got skipped because Ed didn't remember to resubmit it. That's
>kind of an annoying bother, particularly if you write a lot of stuff, and
>Ed Lai has.
Jon is correct...the AE Interaction FKEY works fine with all the Finders
I've tried it with (through 7.1.4).
What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
the "Scriptable Finder"). The crash PC is (per Macsbug as seen on my 8100)
1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
place to crash]). Crash seen both with Finder 7.1.3/Finder Scripting
Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
on the 8100. [Proper install from an Installer floppy on the IIci...drag
install of the extension on the Power Mac.]
If it hurts (on your machine), don't do it.
The FKEY is wonderfully useful...thanks Ed!
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 4 Apr 1994 16:15:37 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Richard Kline <kliner@SYNOPSYS.COM>
Subject: Re: reading the contents of a text file
I am running version 1.1 of Applescript with a powermac 8100 and they
appears to be a major bug in Apple script. I was wondering if anyone else
had seen this.
Basicly when ever you compile a script it formats the text so there is only
one work or argument on a line.
Example
Precompiled text looks like this:
property textHolder : {""}
property writeLoc : {0}
property searchString : {"STATUS*Profiler Client"}
property sheetname : {""}
after a check or run the text looks like the following:
property
textHolder : {""}
property
writeLoc : {0}
property
searchString : {"STATUS*Profiler Client"}
property
sheetname : {""}
This get to be a real problem for if thens and loops
precheck
if not (exists Document "mtview.xls") then
open alias "New Disk:New Stuff:mtview.xls"
end if
postscheck
if
not
(exists Document "mtview.xls") then
open alias "New Disk:New Stuff:mtview.xls"
end
if
Although the stuff is impossible to read it appears to work.
Comments or suggestions?
Thanks
Rich
----------
Richard Kline
Synopsys, Inc. e-mail: kliner@synopsys.com
700 East Middlefield Road phone : (415) 694-4079
Mountain View, CA 94043-4033 fax : (415) 965-8637
=========================================================================
Date: Mon, 4 Apr 1994 16:48:43 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: reading the contents of a text file
At 16:15 4/4/94 -0700, Richard Kline wrote:
>I am running version 1.1 of Applescript with a powermac 8100 and they
>appears to be a major bug in Apple script. I was wondering if anyone else
>had seen this.
>
>Basicly when ever you compile a script it formats the text so there is only
>one work or argument on a line.
Not on my 8100, running AppleScript 1.1. Here's some post-compile output
based on your input:
property textHolder : {""}
property writeLoc : {0}
property searchString : {"STATUS*Profiler Client"}
property sheetname : {""}
if not (exists document "mtview.xls") then
--open alias "New Disk:New Stuff:mtview.xls"
display dialog "foo"
end if
I have no idea why our results differ. --John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 4 Apr 1994 18:30:55 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: mark stewart <mark_stewart@BIAD23.UTHSCSA.EDU>
Subject: using Finder Scripting Tool
using Finder Scripting Toolkit
Okey-dokey,
I'm really frustrated here. Has anyone been using Dan Ranson's Finder Scripting
Toolkit with any success? If so what am I doing wrong? I'm trying the most
basic of the scripts, OpenObjects, and it doesn't work.
I've got AppleScript 1.1, Script Editor 1.1, and 1.0 of the Toolkit.
I'm trying to launch an application in Dan's words "as if [it] were
double-clicked in the Finder." These are my assumptions:
1. Dan defines an alias in the form "alias "Disk:folder:file"". He says "It
cannot be a pathname or some other way of refering to the object." Okay, so
this means an alias is something I have to first create before I can call it in
a script, correct?
2. And it really *is* a pathname, simply a pathname to the alias that points to
the object.
3. The container is an alias to the folder that contains the application you
want to launch. The objs is an alias to the application within the container
folder.
Why then would the following *not* do a blessed thing, except compile?
on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 alias", #194#
{"Mark's HD:Apps:Microsoft Excel alias"})
end OpenObjects
Here I have made two aliases, one to the folder at "Mark's HD:Apps:Microsoft
Excel 4.0:" (alias path "Mark's HD:Apps:Microsoft Excel 4.0 alias" and the
other to application at "Mark's HD:Apps:Microsoft Excel 4.0:Microsoft Excel"
(pointed to by "Mark's HD:Apps:Microsoft Excel alias"). I click the Run button
and nada. No complaints from the Editor but no action either. It doesn't seem
to matter where I put the two aliases as long as the paths I give the Editor is
valid.
My intention was to use this set of scripts for networking purposes but I
haven't yet tried. Is it more reliable over the wire? That would be strangely
counter-intuitive. Two fellows piped in on my original query--John Pugh and
Matt Ahrens. Might they have any ideas?
Mark Stewart
BIAD-Research Imaging Center
UTHSCSA
stewart@uthscsa.edu
=========================================================================
Date: Mon, 4 Apr 1994 21:04:17 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: your mail
If you have emailed me rescently, or have posted in regard to a topic I
have started, could you please resend your message?
I was having some problems with my mailer and your mail may have been lost.
thanx a lot, and sorry for the bandwith!
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Mon, 4 Apr 1994 20:05:56 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Brian Gaines <gaines@FSC.CPSC.UCALGARY.CA>
Subject: Re: using Finder Scripting Tool
In message <199404050041.SAA07033@fsa.cpsc.ucalgary.ca> Macintosh Scripting
Systems writes:
> using Finder Scripting Toolkit
> Okey-dokey,
> I'm really frustrated here. Has anyone been using Dan Ranson's Finder
> Scripting
> Toolkit with any success? If so what am I doing wrong? I'm trying the most
Mark your posted material seems to have got a bit corrupted and I couldn't
see what was going on. However, I can confirm that the finder events do
work as specified. They don't seem to do any coercion so you have to have
exactly the structure specified, ie an alias to the folder and a list of
aliases to files.
One thing you CAN get away with that helps a lot is that the alias to the
folder can be an alias to a file within the folder. This means, for example,
that if you are just opening one file you can use the same alias in both
positions.
I've been using the finder calls successfully in scripts within my application
both on the local machine and across the net. They are very neat compared
with loading the whole of finderlib.
b.
Brian Gaines Knowledge Science Institute, University of Calgary
gaines@cpsc.ucalgary.ca Calgary, Alberta, Canada T2N 1N4
=========================================================================
Date: Tue, 5 Apr 1994 11:54:30 +0930
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
Subject: Thanks!
To all of you out there who responded to my problems regarding
Applescripting FileMakerPro from Hypercard2.2 - Thanks.
I now have HC2.2 producing stand-alone applications (apparently I hadn't
transferred the StackToApp extension to my extensions folder (pity the HC
installation doesn't do this for you).
I still can't by-pass the FileMakerPrto "open file" dialog box but I'm
still trying. I can do it from HC, but its certainly not "pretty".
So, thanks again!
Paul J. Stoll
Computer Assisted Learning Unit
Flinders University of South Australia
Flinders Medical Centre
Bedford Park. 5042.
South Australia.
=========================================================================
Date: Mon, 4 Apr 1994 23:22:21 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Thanks!
At 11:54 4/5/94 +0930, Paul J. Stoll wrote:
>I still can't by-pass the FileMakerPrto "open file" dialog box but I'm
>still trying. I can do it from HC, but its certainly not "pretty".
That can be done from a UserTalk (Frontier) script, but you also (under
Frontier) need to bring FileMaker to the front before the open message.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 5 Apr 1994 20:34:59 CST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jiaw-yih Hwang <joy1@MAIL.NCKU.EDU.TW>
Subject: Scriptible Communication Software:?
Hi! Netter:
Is there any coummunication software which could eastablish a SLIP conection
and
could be scripted.
====================================================================
/=====| Jiaw-yih Hwang
/ | Department of Interior Design,
/ | Tainan Junior College of Home Economics, Taiwan
============ ------------------------------
[]-[]----} joy1@mail.ncku.edu.tw
/_ ------------------------------
== "Less is More."
[_ "These are rumors. I reserve the right to be wrong."-Murph
====================================================================
=========================================================================
Date: Tue, 5 Apr 1994 09:13:44 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John Schettino <js12@GTE.COM>
Subject: Re: reading the contents of a text file
>I am running version 1.1 of Applescript with a powermac 8100 and they
>appears to be a major bug in Apple script. I was wondering if anyone else
>had seen this.
>
>Although the stuff is impossible to read it appears to work.
>
>
>Comments or suggestions?
I'd re-install AS 1.1 - this is not normal. Your dialect file may be
trashed. You can also try going into the script editor's edit,applescript
formatting..., and choose defaults to see if that clears it up.
- john
-----------------------------------------
js12@gte.com GTE Laboratories
John Schettino Waltham, MA
=========================================================================
Date: Tue, 5 Apr 1994 08:41:28 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Scriptible Communication Software:?
In-Reply-To: Your message of "Tue, 05 Apr 94 20:34:59 CST"
>Hi! Netter:
>Is there any coummunication software which could eastablish a SLIP conection a
>nd
>could be scripted.
>
Pick up a copy of InterSlip AE. You'll find it at
ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/InterSLIP_AE_1.0b1.sit.hqx
Cheers.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Tue, 5 Apr 1994 11:14:21 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Where is drag manager?
I guess the subject says it all. where can I find the drag Manager,
if it is available yet.
tia!
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Tue, 5 Apr 1994 11:46:34 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Re: coercing file references to anything
Leonard Rosenthol <leonardr@NETCOM.COM> mentioned that i
am trying to do a double coercion. i am not. i am
trying to do anything useful with the "Finder Selection" command in
"Jon's Commands". David Ray <daver@NETCOM.COM>
mentioned that he also has the same
problem in AS 1.0. i also have version 1.0. I have asked before, and
now I am PLEADING. PLEASE SEND ME APPLESCRIPT 1.1! This IS LEGAL.
All that I want is the Extension. if you will read your liscence, it
says that you can distribute the extension & osaxen to anyone you like.
thanx very much!
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Tue, 5 Apr 1994 11:47:18 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Re: sending raw appleevents
Thanx to everyone for their help with this question. you have mentioned
that I can use the AEInteraction FKEY. Unfortunately I don't get the
developers' CD. could someone tell me where to get this FKEY (FTP
preferred), or email it to me, or give me the address of the author?
thanx a lot!
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Tue, 5 Apr 1994 10:19:52 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jay Martin <jay_martin@POSTOFFICE.AIDT.EDU>
Subject: Re> Where is drag manager?
>I guess the subject says it all. where can I find the drag Manager,
>if it is available yet.
The drag manager must be bought as part of the dev. kit from APDA (it's
called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
800-282-2732). Supposedly, it's distributed with applications that are
drag-aware, but I don't know of any shipping yet. It's not currently
distributed with the system software (maybe 7.5?).
Jay
+---------------------------------------+----------------------------------+
| --------------+ Jay M. Martin | All ideas here are my own and |
| +---------- | Alabama Industrial | in no way reflect my employer's. |
| | ----------+ Development Training | martin@aidt.edu |
| +---------------------------------- | |
+---------------------------------------+----------------------------------+
=========================================================================
Date: Tue, 5 Apr 1994 15:00:42 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Re> Where is drag manager?
In-Reply-To: <no.id> from "Jay Martin" at Apr 5, 94 10:19:52 am
--Jay Martin wrote:
>
>
>The drag manager must be bought as part of the dev. kit from APDA (it's
>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
>800-282-2732).
It was also included on the latest Develop magazine CD.
>Supposedly, it's distributed with applications that are drag-aware, but
>I don't know of any shipping yet.
This is because Apple hasn't given the official go ahead for the
lisencing of the MDD extension. This will probably happen in about a
month or so.
>It's not currently distributed with the system software (maybe 7.5?).
Correct. The Drag Manager will be an official part of 7.5. As will
QuickDraw GX, and posibly QuickTime 2.0 if tey can finish it in time.
-Hades
=========================================================================
Date: Tue, 5 Apr 1994 12:02:04 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: A bunch of stuff
Please pardon my lack of attributions. Various people said various things.
You know who you are.
>If you only have one startup volume prepared, make a copy of Finder by
>dragging its icon to another folder while holding down the option key.
>Using ResEdit or one of the others, modify the SIZE -1 resource. Add
>100,000 or so to the second size box in that resource (shown in decimal
>bytes by ResEdit, other editors may differ). Quit ResEdit or whatever.
>Drag the Finder out of the System Folder (to Trash is OK). Drag your
>modified Finder into the System folder. Restart.
Just an optimization: drag the Finder (or any other busy file) out of the
system folder to the desktop. Option-drag it back and edit that one.
Restart. It's just a bit less dragging around and you have the old one
lying on the desktop if you need it after you screw up. ;)
>>i can't seem to coerce a file reference to anyhting else. for example,
>>
>>(file "Duo-Gnosis:test") as string
>>or
>>(file "Duo-Gnosis:test") as alias
>>or
>>alias (file "Duo-Gnosis:test")
>
>This is the same problem I have been running into with the Jons Commands
>osax. There is a command called "finder selection" that returns a list
>with format like {file "Mac:folder:file"}. The problem is that if I want
>to use "finder selection" in a script, I can't coerce the result into a
>string. I get an error if I use any of the following:
>
>set theFile to item 1 of finder selection
>return (theFile as string) <--- error
>
>Jon Pugh who wrote the osax says that he has no problem coercing it into
>a string, using Applescript 1.1. I'm using Applescript 1.0. maybe that's
>the culprit.
I just checked with a friend at Apple and he confirms that the file object
specifier to string coercion was added in Applescript 1.1. I might add an
fss to string coercion to the next version of Jon's Commands.
>>I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
>>It probably got skipped because Ed didn't remember to resubmit it. That's
>>kind of an annoying bother, particularly if you write a lot of stuff, and
>>Ed Lai has.
>
>
>Jon is correct...the AE Interaction FKEY works fine with all the Finders
>I've tried it with (through 7.1.4).
>
>What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
>the "Scriptable Finder"). The crash PC is (per Macsbug as seen on my 8100)
>1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
>place to crash]). Crash seen both with Finder 7.1.3/Finder Scripting
>Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
>on the 8100. [Proper install from an Installer floppy on the IIci...drag
>install of the extension on the Power Mac.]
Hmmm, my Finder is the scriptable one and it works fine for me. Perhaps
it's a memory related problem. I have upped my SIZE resource as described
previously.
>If it hurts (on your machine), don't do it.
Always good advice.
>on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 alias", #194#
> {"Mark's HD:Apps:Microsoft Excel alias"})
>end OpenObjects
>
>Here I have made two aliases, one to the folder at "Mark's HD:Apps:Microsoft
>Excel 4.0:" (alias path "Mark's HD:Apps:Microsoft Excel 4.0 alias" and the
>other to application at "Mark's HD:Apps:Microsoft Excel 4.0:Microsoft Excel"
>(pointed to by "Mark's HD:Apps:Microsoft Excel alias"). I click the Run button
>and nada. No complaints from the Editor but no action either. It doesn't seem
>to matter where I put the two aliases as long as the paths I give the Editor
is
>valid.
>
>My intention was to use this set of scripts for networking purposes but I
>haven't yet tried. Is it more reliable over the wire? That would be strangely
>counter-intuitive. Two fellows piped in on my original query--John Pugh and
>Matt Ahrens. Might they have any ideas?
Maybe they would...
I've been burned by minimal aliases before. Folder aliases must end in a
colon. Yours does not. You might also need to skip the aliases to
aliases. Try:
on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 folder:", --
{alias "Mark's HD:Apps:Microsoft Excel 4.0 folder:Excel"})
end OpenObjects
Jon
=========================================================================
Date: Tue, 5 Apr 1994 15:12:18 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Re: Re> Where is drag manager?
Is the drag manager part of System 7 Pro? Are you talking about the drag
and drop features of Apple Mail, or something else?
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Tue, 5 Apr 1994 13:37:43 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jay Martin <jay_martin@POSTOFFICE.AIDT.EDU>
Subject: Re> Where is drag manager?
>>The drag manager must be bought as part of the dev. kit from APDA (it's
>>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
>>800-282-2732).
>>
>It was also included on the latest Develop magazine CD.
>
Really? I've only seen the DocViewer interface notes on any of the CD's (both
the Develop CD and the Developer's mailing CD's), not the actual software. I
guess I'd better look closer!
Jay
+---------------------------------------+----------------------------------+
| --------------+ Jay M. Martin | All ideas here are my own and |
| +---------- | Alabama Industrial | in no way reflect my employer's. |
| | ----------+ Development Training | martin@aidt.edu |
| +---------------------------------- | |
+---------------------------------------+----------------------------------+
=========================================================================
Date: Tue, 5 Apr 1994 16:43:28 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
Subject: Re: Where is drag manager?
At 10:19 AM 4/5/94 -0500, Jay Martin wrote:
>>I guess the subject says it all. where can I find the drag Manager,
>>if it is available yet.
>
>The drag manager must be bought as part of the dev. kit from APDA (it's
>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
>800-282-2732). Supposedly, it's distributed with applications that are
>drag-aware, but I don't know of any shipping yet. It's not currently
>distributed with the system software (maybe 7.5?).
I think the Drag Manager is part of System 7 Pro (or at least the Powertalk
mailer and the finder seem to exhibit the same behavior that is mentioned
in December's _Develop_).
Bob
--
Bob Snyder N2KGO MIME, RIPEM mail accepted
snyderra@dunx1.ocs.drexel.edu finger for RIPEM public key
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
=========================================================================
Date: Tue, 5 Apr 1994 16:56:14 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Where is drag manager?
In-Reply-To: <no.id> from "Bob Snyder" at Apr 5, 94 04:43:28 pm
--Bob Snyder wrote:
>
>I think the Drag Manager is part of System 7 Pro (or at least the Powertalk
>mailer and the finder seem to exhibit the same behavior that is mentioned
>in December's _Develop_).
There is limited Drag Manager support for the PowerTalk system of
System 7 Pro. It is not the full Macintosh Drag and Drop Extension, and
will not work with anything other than the Finder, AppleMail, and the
PowerTalk utilities.
-Hades
=========================================================================
Date: Tue, 5 Apr 1994 17:49:13 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Scriptable non-AOCE version of QuickMail??
Subject says it all - does CE Software have a non-AOCE version of QuickMail
that supports AppleScript?
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Tue, 5 Apr 1994 14:57:28 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Brian Feinberg <brian@IIT.COM>
Subject: MacPPP control source
Would it be possible for the author of the MacPPP control OSAX
to post the source on gaea? I'm another person who's seen the problem
running it from Frontier, and I'd like to take a look at it, maybe make it
a UCMD.
--- Brian
=========================================================================
Date: Tue, 5 Apr 1994 20:02:47 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
Subject: Eudora Notify troubles...
Hi everybody,
I've been haveing alot of trouble working with the message list
returned by Eudora 2.0.2 with a Notify event. Here's essentially what I've
been working with:
--System 7.1 with AppleScript 1.1
--getting Eudora to notify this applet is no problem, so I omitted it.
on =ABevent CSOmeNot=BB messageList
tell application "Eudora 2.0.2"
repeat with thisMessage in messageList
try
set whofrom to (get Sender of thisMessage)
on error errMsg number errNum
display dialog errMsg
end try
display dialog whofrom
end repeat
end tell
end =ABevent CSOmeNot=BB
Ok, here's what's going wrong: The script compiles fine, but during
execution it seems to choke on the "set whofrom to (get Sender of
thisMessage)" line. The error I get back follows:
Can't get Sender of message 178 of mailbox "In" of mail folder "".
The error number is -1728.
If I just make a new script like this:
tell application "Eudora 2.0.2"
get Sender of message 178 of mailbox "In" of mail folder ""
end tell
It works fine. So, am I missing some kind of coercion here, or what? I've
tried coercing thisMessage to reference and text, but niether one works.
Any ideas? It's driving me crazy!
Thanks,
Sam
=========================================================================
Date: Tue, 5 Apr 1994 20:49:00 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Headless Pumpkin <sdouglas@HARTFORD.EDU>
Subject: Re: Re> Where is drag manager?
>>>The drag manager must be bought as part of the dev. kit from APDA (it's
>>>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
>>>800-282-2732).
>>>
>>It was also included on the latest Develop magazine CD.
>>
>Really? I've only seen the DocViewer interface notes on any of the CD's (both
>the Develop CD and the Developer's mailing CD's), not the actual software. I
>guess I'd better look closer!
>
>Jay
I didn't find the DragManager on the Develop Bookmark CD either.
I would recommend however that any graphic artists out there check out
Pixel Paint Pro 3.0. It is applescriptable, recordable, and comes with
AppleScript 1.1 and the DragManager!
This program is wonderful. Oh, and it uses Photoshop plug-ins for good
measure (Kai's PowerTools!!).
Cheers,
-------------------------------------------------------------------------
Scott Douglass *My joys, my griefs, my passions, and *
->sdouglas@hartford.edu<- * my powers, *
dithyramb@pan.com *Made me a stranger. Byron*
scott@pumpkin.uucp http://www.hartford.edu/UofHWelcome.html
finger me for my public key! MIME spoken here!
=========================================================================
Date: Tue, 5 Apr 1994 22:58:18 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chris Brannon <cbrannon+@PITT.EDU>
Subject: Eudora Script (save & close)
Here is a script I'm trying to get to work:
tell application "Eudora1.4.2"
activate
make inserthere end of mailbox "Out" of mail folder "" objectclass
message
copy (the clipboard) to field named "" of message named ""
copy "Info-Mac" to field named "Subject:" of message named ""
save
close
end tell
The trouble is with the "save" and "close" part. How can I get Eudora to
save the message (not queue it) and close the window?
The Eudora dictionary says:
close reference
save reference -- the object to save
I can't figure out what to put in the "reference" part.
Thanks in advance,
Chris
=========================================================================
Date: Tue, 5 Apr 1994 22:58:30 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chris Brannon <cbrannon+@PITT.EDU>
Subject: "save/read data" osax
(gaea.kgs.ukans.edu:applescript/osaxen/savereaddata1.1.cpt.hqx)
I've been trying to use the "save/read data" osax I found on gaea, but I've
run into a problem with the syntax on the "save data" part.
Here is the dictionary:
save data: Stores data object in file specified.
save data data -- data or variable object to store
in alias -- path to file to store in
[replacing yes/no] -- replace or append data
[type type class] -- type of file (default TEXT)
[creator 'sign'] -- creator of file (default 'ttxt')
[erase boolean] -- with/without erase erase or not the
file before
write (default yes)
Result: integer -- error returned from storing (if any)
Here is what I put in my script:
save data newdata in refNum replacing yes
where newdata is a variable containing a list of data, and refNum is a
variable containing the path to the file I want to write to.
Whenever I run the script, it chokes on the line above, saying "Can't make
some data into the expected type."
What am I doing wrong?
Thanks,
Chris
=========================================================================
Date: Tue, 5 Apr 1994 20:44:26 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: A bunch of stuff
Jon Pugh (initially quoting me)
>>What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
>>the "Scriptable Finder"). The crash PC is (per Macsbug as seen on my 8100)
>>1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
>>place to crash]). Crash seen both with Finder 7.1.3/Finder Scripting
>>Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
>>on the 8100. [Proper install from an Installer floppy on the IIci...drag
>>install of the extension on the Power Mac.]
>
>Hmmm, my Finder is the scriptable one and it works fine for me. Perhaps
>it's a memory related problem. I have upped my SIZE resource as described
>previously.
Hmmm...the only way I can get the crash to stop is to remove the Finder
Scripting Extension. I've given Finder 200,000 extra bytes, in addition to
the 100,000 extra I had already given it to make OSAMenu and FinderMenu
happy. AND I have run with minimal extensions (just the PowerPC Enabler,
and the Finder-related PPC-related enabler, and Finder Scripting
Extension). Nothing else. Including ditching the SCSI chain to get rid of
the (outrageously old...MUST update) SilverLining driver from the external
hard drive. No Apple Menu Items, no Control Panels (someone carefully
makes empty folders where those ought to be).
It would be time to ask Ed, except that I'm quite sure he has more
important work to do (more important to his management, and more important
to *me*, to).
Thanks for your time, Jon...you caused me to explore more deeply than I
would have.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 6 Apr 1994 01:14:21 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Carl F Steadman (Carl Steadman)" <stead002@MAROON.TC.UMN.EDU>
Subject: Eudora & scripts always running...
I just finished writing an AppleScript which mails an automatic reply to
mail which is sent to a particular account, and then redirects the mail to
a human recipient, which seems to work fine. I have NotifyMail opening
Eudora when mail arrives at the POP server, and then Eudora sending a
message to my script using "please notify", which then does its stuff.
Now, to make everything work, I've had to save as an application, and check
"Stay Open". Is this the nature of "please notify", or am I doing something
wrong? I'm thinking Eudora should just be able to launch the script, which
can then quit when it's done, though I could be thinking wrong.
On a connected note, how does one quit a script which you've instructed to
stay open, and have told not to put up dialog boxes? If I attempt to quit,
it just re-launches - which isn't a problem now, but it was annoying, for a
time, when I wanted to make changes.
Thanks.
Carl
Carl Steadman stead002@maroon.tc.umn.edu 612.626.9750
http://www.cdtl.umn.edu/carl.html
=========================================================================
Date: Wed, 6 Apr 1994 03:03:46 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
Subject: Re: Eudora & scripts always running...
I've been playing with Eudora's "please notify" for a while now, and I can
that I think I know what it does, but I still can't get it to work
completely :-) (see a previous post by me...)
Anyway, as I recall, I believe that when you send Eudora a please notify
event, it saves the name of the calling application as a property, so it
will start up the application if it is not running, even if Eudora has quit
and been restarted. The only way to turn this off, I believe is through
telling Eudora to specifically turn notifying off for that application.
As far as getting your stay-open script to quit - that sounds like an error
in the quit handler to me. I had the same problem. The script will
compile fine, but will encounter a run-time error before it hits the
continue statement, not report the error, abort the quit handler, and just
stay open. It's pretty annoying, and it took me a while to figure this one
out.
Good Luck,
Sam
P.S. If you figure out how to access the fields of the messages of the
message list Eudora returns on the notify event, please post it or send it
to me, it's probably really easy, but I just can't get it to work.
>I just finished writing an AppleScript which mails an automatic reply to
>mail which is sent to a particular account, and then redirects the mail to
>a human recipient, which seems to work fine. I have NotifyMail opening
>Eudora when mail arrives at the POP server, and then Eudora sending a
>message to my script using "please notify", which then does its stuff.
>
>Now, to make everything work, I've had to save as an application, and check
>"Stay Open". Is this the nature of "please notify", or am I doing something
>wrong? I'm thinking Eudora should just be able to launch the script, which
>can then quit when it's done, though I could be thinking wrong.
>
>On a connected note, how does one quit a script which you've instructed to
>stay open, and have told not to put up dialog boxes? If I attempt to quit,
>it just re-launches - which isn't a problem now, but it was annoying, for a
>time, when I wanted to make changes.
>
>Thanks.
>
>Carl
>
> Carl Steadman stead002@maroon.tc.umn.edu 612.626.9750
> http://www.cdtl.umn.edu/carl.html
=========================================================================
Date: Wed, 6 Apr 1994 07:11:10 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chris Brannon <cbrannon+@PITT.EDU>
Subject: Re: Eudora Script (save & close)
Allan Marcus wrote:
>>The trouble is with the "save" and "close" part. How can I get Eudora to
>>save the message (not queue it) and close the window?
>When you say "save", do you mean save to a disk file (try Save As), or sav
>to the out box, but don't send (queue: never)?
Allan,
I mean to save the newly created message to the out box, so I can address
it, add comments, and send it later.
Regards,...Chris
+--------------------------------------------------------------------------
Christopher B. Brannon University of Pittsburgh
cbrannon+@pitt.edu THE*TRUTH*IS*OUT*THERE Political Science
=========================================================================
Date: Wed, 6 Apr 1994 09:07:20 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Dennis J. Wilkinson, II" <djw@CRASUN.CRA.COM>
Subject: Re: Eudora Notify troubles...
<script deleted>
>Ok, here's what's going wrong: The script compiles fine, but during
>execution it seems to choke on the "set whofrom to (get Sender of
>thisMessage)" line. The error I get back follows:
>
>Can't get Sender of message 178 of mailbox "In" of mail folder "".
>
>The error number is -1728.
You mean you're actually getting an error code back? For myself (and
apparently for Steve Dorner as well) the script just stops. Period. No
errors, no return code, and if it's a standalone, it keeps running and will
accept future notification events. I don' get it, either.
I can iterate over the messages in the "In" folder fine, check if they've
been read, and take action, but that doesn't do anything for me if
something's been filtered into another folder by Eudora.
BTW -- if you do something silly, like, say, having Eudora notify an
applet, trash the applet, and then have Eudora go looking for things that
don't exist, you can stop notifying everything you notify by removing the
'eNot' resource in the Eudora Settings file with the resource mangler of
your choice. Eudora will build a new one on the next Notify.
-- Dennis
----------------------------------------------------------------------------
Dennis J. Wilkinson, II : Usual disclaimers apply. If I put
djw@crasun.cra.com : my foot in my mouth, it's my
Software Engineer : fault, and has nothing at all to
Charles River Analytics, Cambridge MA : do with CRA, Inc.
=========================================================================
Date: Wed, 6 Apr 1994 09:51:20 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <myers@ACEC.COM>
Subject: Does Frontier allow custom error handling routines?
Can I put my own custom error handling routine in a Frontier script?
Searching through the documentation didn't turn up anything. Failing
that, can anybody tell me how to work around this problem in Eudora:
I use a script called mailSorter() to file away mail from some of the
more voluminous listservs I subscribe to, in order to separate that
from personal e-mail. The script relies on the "Sender" field attached
to most messages generated from a listserv. I can call Eudora with
the following script to find out the Sender field:
on getSender (i) {
local (m);
with objectModel, Eudora {
m = mailfolder[""].mailbox["In"].message[i].field["Sender"];
return(core.get (id, m));
}}
Unfortunately, any e-mail message that does not contain a Sender field
(i.e., all messages *not* generated by a listserv) will cause Eudora to
report an error, and script execution stops. Obviously, the proper way
around this would be to install a custom error handling routine that could
intercept the error and allow execution to continue with the remaining mail.
Any ideas on how to tackle this one? Appreciate your thoughts...
-David.
=========================================================================
Date: Wed, 6 Apr 1994 07:06:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: MACSCRPT Digest - 4 Apr 1994 to 5 Apr 1994
>Date: Tue, 5 Apr 1994 14:57:28 PDT
>From: Brian Feinberg <brian@IIT.COM>
>Subject: MacPPP control source
>
> Would it be possible for the author of the MacPPP control OSAX
>to post the source on gaea? I'm another person who's seen the problem
>running it from Frontier, and I'd like to take a look at it, maybe make it
>a UCMD.
I'm not sure how Frontier operates, but I have found that MacPPP Control
(actually MacPPP) cannot be used from a Faceless Background Application.
This is because MacPPP presents its dialing dialog box when connecting.
Doing this from a FBA is bad news, and the result is almost always a system
crash of one form or another. I found this trying to use MacPPP and MacPPP
Control with System 7 Pro and the Starnine ACOE Internet Gateway.
If Frontier executes OSAXs from a FBA then it will certainly have the same
problems.
Can I still download the Frontier Run-Time from the net? If so, and if you
would send me whatever it is I need to repeat the problem using Frontier
Run-Time, I'll try and work out a solution.
Finally, a new version of MacPPP Control is in the works. I expect to
release it sometime in May after I get my current project to Beta stage.
-Mark
=========================================================================
Date: Wed, 6 Apr 1994 07:14:44 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Lewis <lewis@NETCOM.COM>
Subject: Re: Does Frontier allow custom error handling routines?
>Can I put my own custom error handling routine in a Frontier script?
>Searching through the documentation didn't turn up anything. Failing
>that, can anybody tell me how to work around this problem in Eudora:
>
>I use a script called mailSorter() to file away mail from some of the
>more voluminous listservs I subscribe to, in order to separate that
>from personal e-mail. The script relies on the "Sender" field attached
>to most messages generated from a listserv. I can call Eudora with
>the following script to find out the Sender field:
>
>on getSender (i) {
> local (m);
> with objectModel, Eudora {
try {
> m =3D mailfolder[""].mailbox["In"].message[i].field["Sender"];
> return(core.get (id, m));
else
(do something appropriate with other mail)
> }}}
>
>Unfortunately, any e-mail message that does not contain a Sender field
>(i.e., all messages *not* generated by a listserv) will cause Eudora to
>report an error, and script execution stops. Obviously, the proper way
>around this would be to install a custom error handling routine that could
>intercept the error and allow execution to continue with the remaining mail=
.
>
>Any ideas on how to tackle this one? Appreciate your thoughts...
>
>-David.
The =B3try=B2 verb is what you want. It executes the else clause (and aborts
execution of the try clause) if the try cause gets a run-time error. It=B9s
in the DocServer text.
David (getting in before John Baxter)
------------------------------------------------------------------------
David Lewis lewis@netcom.com (408) 439-2374
=========================================================================
Date: Wed, 6 Apr 1994 10:22:36 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Re: Eudora Script (save & close)
>The trouble is with the "save" and "close" part. How can I get Eudora to
>save the message (not queue it) and close the window?
>
>The Eudora dictionary says:
> close reference
> save reference -- the object to save
>
>I can't figure out what to put in the "reference" part.
You made a message at the end of the "Out" mailbox. Don't you just use the
same reference? Alternatively, try using the reference:
message 1
And that's it (no mailbox, no mail folder). "message 1" by itself always
references the top most window. I haven't tried this yet, so let me know
if it works....
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Wed, 6 Apr 1994 09:23:23 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Fred.Terry." <pfterry@LKS.CSI.COM>
Subject: Scheduler
Everyone,
I've just uploaded a demo version of Mark Alldritt's Scheduler to gaea.
You'll
find it in
ftp://gaea.kgs.ukans.edu/applescript/addons/schedulerdemo.hqx
Have fun.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Wed, 6 Apr 1994 11:45:09 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Allan Marcus <allan_marcus@LANL.GOV>
Subject: Re: Eudora Script (save & close)
>Allan Marcus wrote:
>>>The trouble is with the "save" and "close" part. How can I get Eudora to
>>>save the message (not queue it) and close the window?
>
>>When you say "save", do you mean save to a disk file (try Save As), or sav
>>to the out box, but don't send (queue: never)?
>
>Allan,
>
>I mean to save the newly created message to the out box, so I can address
>it, add comments, and send it later.
This should work, but it doesn't:
tell application "Eudora"
activate
set x to make message InsertHere (end of mailbox "Out" of mail
folder "")
set field "To" of x to "allan_marcus@lanl.gov"
set field "Subject" of x to "Subject"
set field "" of x to "Body-of-message"
queue x QueueType 2
end tell
If I use "queue x QueueType 1" it does work. The dictionary says:
queue message -- The message to queue.
[QueueType small integer] -- Now 0, Next 1, Later 2, Never 3.
[When integer] -- When to send message, seconds (local time).
Are 2 and 3 support yet?
Thanks,
Allan
---------------------------------------
Allan Marcus
Los Alamos National Laboratory
"My opinions are my own, I think..."
Voice: 505-665-1828
CIS: 76666,2113
AppleLink: Allan.Marcus
e-world/NewtonMail: Allan.M
InterNet: allan_marcus@lanl.gov <- note new address (deja vu!)
---------------------------------------
=========================================================================
Date: Wed, 6 Apr 1994 10:55:21 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Dorner <sdorner@QUALCOMM.COM>
Subject: Re: Eudora Script (save & close)
At 10:42 AM, Allan Marcus wrote:
>This should work, but it doesn't:
> queue x QueueType 2
You haven't specified the "when" parameter, which is required for a type of
later.
> queue message -- The message to queue.
> [QueueType small integer] -- Now 0, Next 1, Later 2, Never
3.
> [When integer] -- When to send message, seconds (local
time).
If you want to save it indefinitely, the only way to do it is queue it with
next and then again with never.
--
Steve Dorner, Qualcomm Incorporated
"There's nothing wrong with you that can't be cured
with a little Prozac and a polo mallet." - Woody Allen
=========================================================================
Date: Wed, 6 Apr 1994 09:08:40 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Does Frontier allow custom error handling routines?
At 09:51 4/6/94 -0500, David Myers wrote:
>Can I put my own custom error handling routine in a Frontier script?
>Searching through the documentation didn't turn up anything. Failing
>that, can anybody tell me how to work around this problem in Eudora:
Yes...starting with Frontier 2.0, the try...else... construct was added.
try
some statements which might produce an error
else
do something about the error.
Within the else part, the text that would have been in the Error Info
window is available in the special variable tryError.
--John
--John W. Baxter Port Ludlow, WA USA jwbaxter@pt.olympus.net
UserLand Software support
=========================================================================
Date: Wed, 6 Apr 1994 10:25:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: MacPPP OSAX under Frontier's FinderMenu
My immediately-available archives don't go back to the first message under
this subject. I just tried this script, as a FinderMenu shared script
running Frontier 3.0.1 and then running Runtime 3.0.1. It worked fine in
both cases.
frontier.bringToFront ()
macPPPcontrol.openPPP ()
Could someone remind me of the original problem? Thanks.
--John
--John W. Baxter Port Ludlow, WA USA jwbaxter@pt.olympus.net
UserLand Software support
=========================================================================
Date: Wed, 6 Apr 1994 12:39:47 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: K J Fox <kjfox@MKE.AB.COM>
Subject: Eudora 1.4.2 HELP ME!!!
I recently converted from 1.4.1 to 1.4.2 and now some of my AppleScripts
for Eudora don't seem to work. In particular, I'm trying to set a
message's status to READ from UNREAD once I've processed it.
I seem to have used a command "SetData..." in 1.4.1 but it seems to have
changed as my scripts won't compile.
Any ideas???
Ken Fox
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Kenneth J. Fox
Rockwell Automation - Allen Bradley Co.
Milwaukee, WI (414)382-3287
kjfox@mke.ab.com
=========================================================================
Date: Wed, 6 Apr 1994 10:37:32 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Brian Feinberg <brian@IIT.COM>
Subject: Re: MacPPP OSAX under Frontier's FinderMenu
>From: Mark Alldritt <alldritt@wimsey.com>
>I'm not sure how Frontier operates, but I have found that MacPPP Control
>(actually MacPPP) cannot be used from a Faceless Background Application.
>This is because MacPPP presents its dialing dialog box when connecting.
>Doing this from a FBA is bad news, and the result is almost always a system
>crash of one form or another. I found this trying to use MacPPP and MacPPP
>Control with System 7 Pro and the Starnine ACOE Internet Gateway.
>
>If Frontier executes OSAXs from a FBA then it will certainly have the same
>problems.
Well, Frontier isn't an FBA, but an application, and in fact I bring it
to the front before calling MacPPP Control. Opening MacPPP works fine,
it's closing it that causes the problem.
--- Brian
=========================================================================
Date: Wed, 6 Apr 1994 14:24:34 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <myers@ACEC.COM>
Subject: Re: Does Frontier allow custom error handling routines?
>Yes...starting with Frontier 2.0, the try...else... construct was added.
>
> try
> some statements which might produce an error
> else
> do something about the error.
>
> Within the else part, the text that would have been in the Error Info
>window is available in the special variable tryError.
>
>--John
The *try* verb??? Sheesh...I never would have thought to look up that name
in the DocServer. Apologies for my lame question. But in self defense, I
would point
out that there *ought* to be an index listing under "Error Recovery" or
something
like that...:-)
Thanks to David Lewis for answering as well.
=========================================================================
Date: Wed, 6 Apr 1994 14:57:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "peter (p.s.) wilson" <peterw@BNR.CA>
Subject: Sequential execution with Frontier Runtime
Hi,
I'm writing a number of Installer scripts in Frontier.
I want to allow customers to select 2 or more scripts and
launch/run them with Frontier Runtime. This works but the
scripts do not run sequentially since Apple's Thread Manager
is loaded. Concurrent execution causes collisions on certain
control files.
Frontier.enableAgents (false) seemed like the answer to limit
processing to a single script thread but Runtime does not
support this procedure... sigh.
Is there another technique or simple solution that would
allow me to restrict processing to a single script until that
script is complete?
Regards,
Peter Wilson
Software Support, BNR Ottawa.
peterw@bnr.ca
=========================================================================
Date: Wed, 6 Apr 1994 12:58:25 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: MacPPP OSAX under Frontier's FinderMenu
>Ok, I've gotten a good copy of MacPPP Control. I've installed it into
>Frontier using the Load OSAX droplet. The script fragment
>
> if PPPOpened () {
> closePPP ()
> }
>
>works fine if executed from Frontier (placed into a script which is
>executed from the Quick Script window). If called from FinderMenu, however,
>it will hang the machine if the closePPP () clause is executed.
Hi, David...I couldn't find your message in my archives, because I had left
it in the Eudora In box for attention <sigh!>.
That is an interesting freeze...it appears to be looping in this code:
+000C 0014F972 JSR fsm_close
+0010 0014F976 ADDQ.L #$4,A7
+0012 0014F978 BRA.S PPPClose+0016
+0014 0014F97A _SystemTask
+0016 0014F97C MOVEA.L $0008(A6),A0
+001A 0014F980 *TST.B $29FC(A0)
+001E 0014F984 BNE.S PPPClose+0014
+0020 0014F986 UNLK A6
+0022 0014F988 RTS
which is strange...one would have expected that the _SystemTask would let
whatever needs to happen to change 8(A6) happen (presumably, asynchonous
completion of a call, clearing a flag). But...there is the Runtime window
in front (at least, when I include a frontier.bringToFront ()), with a
pending update event. Not the problem...it freezes with the Runtime window
closed, too. Hmmm.
I even went to the length of doing this:
misc.doScript ('LAND', "macPPPControl.closePPP ()")
in the shared script, which still froze. That made very sure that Runtime
was the application whose world was being used.
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 6 Apr 1994 17:38:50 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Dorner <sdorner@QUALCOMM.COM>
Subject: Scripting Eudora
I hear there's been some discussion on this list about scripting Eudora.
I have started a scripts directory on our ftp site (ftp.qualcomm.com,
quest/mac/eudora/scripts). Right now, the only things there are a Frontier
install file and a very simple AppleScript. It will be expanded as I have
time. I will consider submitted scripts (mail them to me), but I'm not
going to put anything out there unless I understand exactly what it does.
Don't submit scripts without source; that's a risk I can't take, for
obvious reasons. Also, if you send me a script, please indicate whether or
not we have your permission to put the script on the ftp site; when in
doubt, I won't.
Eudora's Apple Event support is in its infancy. There are lots of things
that it ought to be able to do but can't, and it is very picky about a lot
of things that it should be more flexible about. The 'aete' was composed
with very little understanding of what a proper 'aete' should be. There
are even a few (gasp) bugs. All I can say is that this stuff is hard to
get right and complete the first time, especially with so few examples out
there and so much else to do.
My general strategy is to expand the scripting slowly, starting with
whatever scriptors are most interested in. (That's been going on for quite
some time, actually; the improvements in .1 and .2 have been user-driven.)
But I'd really like to hear from you on what you want most.
Alas, I don't have the time to read this list, but if you have
questions/suggestions, you know where to find me.
--
Steve Dorner, Qualcomm Incorporated
"There's nothing wrong with you that can't be cured
with a little Prozac and a polo mallet." - Woody Allen
=========================================================================
Date: Wed, 6 Apr 1994 20:40:45 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Charles Wiltgen <cwiltgen@MCS.COM>
Subject: Re: Scripting Eudora
>I have started a scripts directory on our ftp site (ftp.qualcomm.com,
>quest/mac/eudora/scripts).
Great news!
--
Charles Wiltgen
MCSnet/Chicago
cwiltgen@mcs.net
=========================================================================
Date: Tue, 5 Apr 1994 15:06:43 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: network_manager@ALDUS.COM
Organization: Aldus Corporation, Seattle, WA
Subject: NDN:MacPPP control source
Your mail to the Microsoft Mail Server could not be fully
delivered! No Valid Addresses! It has been deleted.
Error List:
Bad 'To:' Address: David Rogers,Eng@Sea12
=========================================================================
Date: Wed, 6 Apr 1994 21:47:34 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Scott Gruby <Scott_Gruby@HMC.EDU>
Subject: Concatenating text
I am looking for a way to put two strings together in AppleScript.
Basically I have information in one variable called theRecipient and
information in another variable called theMessage:
theRecipient: Scott_Gruby@hmc.edu
theMessage: testing...
I want theText to contain:
To: Scott_Gruby@hmc.edu
testing...
Is there an easy way to do this in AS? I have looked at some other scripts
but haven't been able to find anything.
Thanks.
Scott_Gruby@hmc.edu
=========================================================================
Date: Wed, 6 Apr 1994 23:19:21 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Concatenating text
>I am looking for a way to put two strings together in AppleScript.
>Basically I have information in one variable called theRecipient and
>information in another variable called theMessage:
>
>theRecipient: Scott_Gruby@hmc.edu
>theMessage: testing...
>
>I want theText to contain:
>To: Scott_Gruby@hmc.edu
>testing...
>
>Is there an easy way to do this in AS? I have looked at some other scripts
>but haven't been able to find anything.
set theRecipient to "Scott_Gruby@hmc.edu"
set theMessage to "testing..."
set theText to theRecipient & return & theMessage
theText
produces
"Scott_Gruby@hmc.edu
testing..."
in the result window. [When in doubt, think HyperCard. You'll be close.]
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 7 Apr 1994 01:17:11 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Quit handlers
>As far as getting your stay-open script to quit - that sounds like an error
>in the quit handler to me. I had the same problem. The script will
>compile fine, but will encounter a run-time error before it hits the
>continue statement, not report the error, abort the quit handler, and just
>stay open. It's pretty annoying, and it took me a while to figure this one
>out.
If this happens to you, use shift-cmd-Q key to skip the quit handler.
Jon
=========================================================================
Date: Thu, 7 Apr 1994 01:17:20 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Eudora 1.4.1
>I recently converted from 1.4.1 to 1.4.2 and now some of my AppleScripts
>for Eudora don't seem to work. In particular, I'm trying to set a
>message's status to READ from UNREAD once I've processed it.
>I seem to have used a command "SetData..." in 1.4.1 but it seems to have
>changed as my scripts won't compile.
Eudora 1.4.1 used nonstandard GetData & SetData events. They were removed
in 1.4.2 in favor of the standard and implicit get and the explicit set
command. Typically you can simply remove the GetData and change SetData to
simply set.
Jon
=========================================================================
Date: Thu, 7 Apr 1994 04:48:39 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Cepol <abduls@RPI.EDU>
Subject: Eudora 1.4.2 & Set
Hai there,
I'm trying to script eudora to redirect some mail to my other
account. However, I did't want to keep any copy of the massage that I
redirect. My default is keep message. Here is my script
redirect message 1 of mailbox "In" of mail folder ""
set field "To" of message "" to "abduls@mts.rpi.edu"
set KeepCopy of message "" to false
This script work fine, but Eudora still keep a copy of the mail that being
redirect. Then I did the following test
1) If I made my default to not keep copy, and do the following script
set KeepCopy of message "" to true
The script do what it should do (i.e eudora will set KeepCopy to TRUE).
2) If I made my default to not keep copy, and do the following script
set KeepCopy of message "" to false
Eudora will set KeepCopy to TRUE, which it shouldn't do.
Could someone help me on this, or confirm me that this is a bug in Eudora.
----------------------------------------------------------------------------
SAIFUL AZUAN ABDUL AZIZ RENSSELAER POLYTECHNIC INSTITUTE TROY NEW YORK 12180
INTERNET:abduls@rpi.edu AOL: AZRIN PHONE:518-273-0549
US-MAIL:1004 PEOPLES AVENUE, 2nd FLOOR, TROY, NEW YORK 12180
DISCLAIMER:WHAT SHOULD I SAY OVER HERE? I DON'T KNOW. CAN YOU FIGURE IT OUT?
----------------------------------------------------------------------------
=========================================================================
Date: Thu, 7 Apr 1994 11:16:00 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Igor Livshits <igorl@UIUC.EDU>
Subject: Get current Eudora selection
Howdy,
I am looking for a code snippet that gets a current Eudora selection (text
selected in the body of the current message, e.g.). If someone has done
this, could you please enlighten me?
Thanks, Igor
_____
=========================================================================
Date: Thu, 7 Apr 1994 14:55:32 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Igor Livshits <igorl@UIUC.EDU>
Subject: Get current Eudora selection
Howdy,
Earlier today I asked:
>I am looking for a code snippet that gets a current Eudora selection (text
>>selected in the body of the current message, e.g.). If someone has done this,
>>could you please enlighten me?
Unfortunately, Steve Dorner replied:
>Can't be done.
>
>--
>Steve Dorner, Qualcomm Incorporated
Bummer, there goes my brilliant idea of selecting an URL, pulling down a
menu, and having Anarchie fetch it in the background :(
Igor
_____
=========================================================================
Date: Thu, 7 Apr 1994 14:30:37 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: Get current Eudora selection
Igor Livshits <igorl@UIUC.EDU> wrote:
>>I am looking for a code snippet that gets a current Eudora selection (text
>>selected in the body of the current message, e.g.). If someone has done this,
>>could you please enlighten me?
Steve Dorner replied:
>Can't be done.
There may be a way to to do this, using the MenuEvents extension or with
the AutoType osax.
The MenuEvents
extension adds Applescript functionality by allowing you to use any
menu item in an application that is apple event aware, even if that
menu item isn't in the scripting suite. You should be able to specify
in a script something like "item 3 of menu 2" corresponding to Copy.
Then go to the other application, and specify "item 4 of menu 2"
(or whatever it is) to paste the data into the other app.
You could also do this with AutoType osax if the Copy and Paste have
command keys (which they usually do in most apps). Highlight the text
you want, then have a section in your script with:
Autotype "c" holding "command" -- this will copy the highlighted text
tell app "whatever" to activate
Autotype "v" holding "command" -- this will paste the clipboard
Let me know if this works.
-Dave
daver@netcom.com
=========================================================================
Date: Thu, 7 Apr 1994 15:38:50 MDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mel Walker <Mel_Walker@NOVELL.COM>
Subject: MacHack - information wanted
Field-1:
Can anyone send me some information about this year's MacHack, or point me to a
source? Thanks. BTW, how many people usually attend?
--Mel Walker
mwalker@novell.com
---Begin attached file "QMFORM.FRM".Z---
begin 666 "QMFORM.FRM".Z
M'YV048Q(:1*E"9(I ,@H*&CDR4 7 IN$T( MH8 !8> 0O0+T8':?Q @4@
MA#8? 0 D+&RR90C10#(G$FSILT '#BM,FSIJ8F$7L*I:DSYU"A:!H.Y&GC
M:-.B1X4VG1E 1(!X*0&(F:DG0#L !68. , @ *":?&0&\' 5[$P" !( <&$4
M0!(S5+;:9'&4+]2H//F2.="DCIP60># 4!!01,H4)P@.2($2I D )C,F;.3
(*H '0R+4E0F4
end
---End attached file "QMFORM.FRM".Z---
=========================================================================
Date: Thu, 7 Apr 1994 17:46:16 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: FrontMost Crash
Hello,
I am writing a simple test client-server system where the client is a an
AppleScript script and the server is a FaceSpan ( nee FrontMost ) created
app. The problem I am having is that when the FaceSpan command "make new
listbox item" ( see below ) gets executed, my Mac hangs ( cursor freezes )
or drops down into MacsBug. It is not consistent.
I have tried all kinds of things:
I am only using the extensions I need.
I have tried saving the FaceSpan app as a complete app or a mini app.
I wrapped a try-error handler around the troublemaker line.
When I call the "AddFile" handler from within the Server app itself it
works fine, but when I call the handler from a client script, I get the
hang.
I don't know what to try next. Anybody out there experience this type of
problem? I have not seen too much discussion of FrontMost on this list. I
hope it is OK to ask this type of question here.
========
Here are the scripts that make up the system. I cut out all the other
stuff. This code still bombs. By the way I am running System 7 Pro on an
fx.
Thanks.
Client Script
-----------------
tell application "Server"
activate
AddFile("junk")
activate current application
end tell
"Server Script" in FrontMost Project Script
---------------------------------------------------------
on AddFile(theFile)
open window "Files To Get"
set theListBox to listbox "File List" of window "Files To Get"
-- I have a valid reference here. I checked using display dialog.
make new listbox item at end of theListBox with properties
{contents:"junk"}
end AddFile
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Thu, 7 Apr 1994 19:46:21 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chris Brannon <cbrannon+@PITT.EDU>
Subject: Re: Eudora script (save & close)
>You made a message at the end of the "Out" mailbox. Don't you just use the
>same reference? Alternatively, try using the reference:
>
> message 1
A reasonable suggestion, but "save message 1" generates an error (Eudora
doesn't understand). "save message" doesn't work either.
Very frustrating....
Chris
=========================================================================
Date: Fri, 8 Apr 1994 16:28:31 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Johan Solve <johan.solve@ITN.HH.SE>
Subject: Re: Get current Eudora selection
> Howdy,
>
> Earlier today I asked:
> >I am looking for a code snippet that gets a current Eudora selection (text
> >>selected in the body of the current message, e.g.). If someone has done
>this,
> >>could you please enlighten me?
>
> Unfortunately, Steve Dorner replied:
> >Can't be done.
> >
> >--
> >Steve Dorner, Qualcomm Incorporated
>
> Bummer, there goes my brilliant idea of selecting an URL, pulling down a
> menu, and having Anarchie fetch it in the background :(
>
> Igor
Can't you just make a "copy" from the Edit menu? Isn't there an osax to
force any application to make a copy?
BTW, I made a script that takes a file list from the clipboard (previously
copied from info-mac digest with EasyView, manually at this state) and
tells Anarchie to download all those files. It hangs sometimes, for some
unknown reason, and it doesn't handle file not found-cases. It uses some
osaxen (clipboard and switch to launcher).
I enclose the script, if anyone finds it interesting. Comments are welcome.
set filelist to the clipboard
if filelist begins with "info-mac" then
with timeout of 60 * 60 seconds
tell application "Anarchie" to activate
switch to launcher
set site to "ftp.sunet.se:/pub/mac/" -- my local mirror
repeat with i from 1 to the number of paragraphs of filelist
set currentfile to paragraph i of filelist
if currentfile is not "" then
set filetoget to site & paragraph i of filelist
tell application "Anarchie" to fetch url filetoget
end if
end repeat
end timeout
else
beep
end if
_______________________________________________________________________
"
JOHAN SOLVE Department of Science and Technology
<johan.solve@itn.hh.se> Halmstad University, Sweden
=========================================================================
Date: Fri, 8 Apr 1994 10:24:42 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chuck Shotton <cshotton@OAC.HSC.UTH.TMC.EDU>
Subject: Mystery AppleEvents and AE Registry ???
I recently added a wildcard handler for AppleEvents to my application, and
all sorts of strange events started showing up. First, does anyone have any
clue what the following events are, and where they might be documented?
(They all are received in response to an OSADoScript call in my
application)
AppleEvent Class = ascr, ID = gdut
AppleEvent Class = syso, ID = ntoc
AppleEvent Class = misc, ID = curd
AppleEvent Class = ears, ID = lfdr
Second, is there a more recent copy of the AppleEvents Registry than the
Winter 1992 issue? That's all I found on the most recent dev. CD, and it
seems pretty out of date.
(If possible, please cc: me directly on any responses. I'm only receiving
digests of this list right now.)
--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_\_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton \
Assistant Director, Academic Computing \ "Shut up and eat your
U. of Texas Health Science Center Houston \ vegetables!!!"
cshotton@oac.hsc.uth.tmc.edu (713) 794-5650 \
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\-_-_-_-_-_-_-_-_-_-_-_-_-
=========================================================================
Date: Fri, 8 Apr 1994 10:29:28 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: FrontMost Crash
1. What is FaceSpan? If you are running early FrontMost code I'd recommend
you get the latest FrontMost. Why troubleshoot an environment that no one
else is using?
2. Your line of code "make new listbox item at end of theListBox with
properties {contents:"junk"}" seems incorrect. I must admit that I am still
not by any means a FrontMost expert but I do not see how this code is
supposed to know what to do. What is "end of theListBox"? I'd say start
small by making a listbox item in code. Then gradually define all it's
properties. THEN, use it in your application.
>"Server Script" in FrontMost Project Script
>---------------------------------------------------------
>on AddFile(theFile)
> open window "Files To Get"
> set theListBox to listbox "File List" of window "Files To Get"
> -- I have a valid reference here. I checked using display dialog.
> make new listbox item at end of theListBox with properties
>{contents:"junk"}
>end AddFile
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Fri, 8 Apr 1994 14:46:02 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: FrontMost Crash
In-Reply-To: <no.id> from "Kee Nethery +1 510 843 6140" at Apr 8,
94 10:29:28 am
--Kee Nethery wrote:
>
>1. What is FaceSpan?
FaceSpan is the new name for Frontmost. The compnay that actually
makes Frontmost is going to be marketing the product themselves,
starting with the new version. To differentiate their product from the
one bundled with AppleScript they have changed the name to FaceSpan.
Personally, I think the new name sucks, and judging by the discussions
on AppleLink, so does just about everyone else.
>If you are running early FrontMost code I'd recommend you get the latest
>FrontMost. Why troubleshoot an environment that no one else is using?
Well, there really weren't any changes from the beta Frontmost, to
the release version. The release version is more stable, but all of the
code should be exactly the same.
>2. Your line of code "make new listbox item at end of theListBox with
>properties {contents:"junk"}" seems incorrect. I must admit that I am still
>not by any means a FrontMost expert but I do not see how this code is
>supposed to know what to do.
I will preface this by saying that I don't know why Frontmost isn't
working for the original poster, however, this particular statement is
quite correct. It is possible to create window items using Frontmost
code.
>What is "end of theListBox"?
This is the location for the new item to be created. Whenever you
call the make command you must specify a destination, this is the same
for the duplicate command and the move command.
>I'd say start small by making a listbox item in code. Then gradually
>define all it's properties. THEN, use it in your application.
First of all, he is making the listbox item in code, that's the
whole point of this script. Second, according to the syntax of the call
you are supposed to define all non-default properties at the time of the
creation.
>>"Server Script" in FrontMost Project Script
>>---------------------------------------------------------
>>on AddFile(theFile)
>> open window "Files To Get"
>> set theListBox to listbox "File List" of window "Files To Get"
>> -- I have a valid reference here. I checked using display dialog.
>> make new listbox item at end of theListBox with properties
>>{contents:"junk"}
>>end AddFile
My one gripe with this script is the original poster doesn't appear
to be using the subroutine parameter theFile. He might also need to set
theListBox to a reference to the listbox, rather than the listbox
itself.
-Hades
=========================================================================
Date: Fri, 8 Apr 1994 16:11:06 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: FrontMost Crash
>1. What is FaceSpan?
It is the new name for FrontMost. I don't know why they changed it.
>If you are running early FrontMost code I'd recommend
>you get the latest FrontMost. Why troubleshoot an environment that no one
>else is using?
I am running FrontMost 1.0 which is what came with the AppleScript 1.1 Kit.
If there is a newer version out there I would like to know about it.
>
>2. Your line of code "make new listbox item at end of theListBox with
>properties {contents:"junk"}" seems incorrect. I must admit that I am still
>not by any means a FrontMost expert but I do not see how this code is
>supposed to know what to do. What is "end of theListBox"?
"end of theListBox" is relative reference form telling FrontMost where to
put the new listbox item I just made. I know this is good code, because
when I call this handler from inside the app that has the handler it works
fine.
> I'd say start
>small by making a listbox item in code. Then gradually define all it's
>properties. THEN, use it in your application.
>
I tried doing it without defining any properties but it did not help.
Thanks for the reply. I am still stumped.
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Fri, 8 Apr 1994 16:31:18 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: FrontMost Crash
...
Stuff deleted from Brian V. Hughes reply. I agree with Brian on everything,
including the lousy new name for FaceSpan.
...
>Brian V. Hughes wrote:
>
> My one gripe with this script is the original poster doesn't appear
>to be using the subroutine parameter theFile. He might also need to set
>theListBox to a reference to the listbox, rather than the listbox
>itself.
>
The reason I did not use "the subroutine parameter theFile" is because in
my original full script I did use it. I stripped out a lot of stuff to try
to narrow down the problem. I guess I should have gotten rid of the
parameter also. I will try it even though I don't see why it should cause a
problem. I will have to think about the reference business. Thanks for the
suggestions, Brian.
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Fri, 8 Apr 1994 15:15:53 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: FrontMost Crash
Sorry I was unable to offer any useful suggestions. AppleScript seems
extremely useful but boy the debugging tools and applications are a long
ways from making this easy. Good luck.
Kee
>>1. What is FaceSpan?
>
>It is the new name for FrontMost. I don't know why they changed it.
>
>>If you are running early FrontMost code I'd recommend
>>you get the latest FrontMost. Why troubleshoot an environment that no one
>>else is using?
>
>I am running FrontMost 1.0 which is what came with the AppleScript 1.1 Kit.
>If there is a newer version out there I would like to know about it.
>
>>
>>2. Your line of code "make new listbox item at end of theListBox with
>>properties {contents:"junk"}" seems incorrect. I must admit that I am still
>>not by any means a FrontMost expert but I do not see how this code is
>>supposed to know what to do. What is "end of theListBox"?
>
>"end of theListBox" is relative reference form telling FrontMost where to
>put the new listbox item I just made. I know this is good code, because
>when I call this handler from inside the app that has the handler it works
>fine.
>
>> I'd say start
>>small by making a listbox item in code. Then gradually define all it's
>>properties. THEN, use it in your application.
>>
>
>I tried doing it without defining any properties but it did not help.
>
>Thanks for the reply. I am still stumped.
>
>--
>Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
>Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
>sshws@convx1.lerc.nasa.gov
>AppleLink: SCHILLING.H
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Fri, 8 Apr 1994 17:04:02 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Mystery AppleEvents and AE Registry ???
>Second, is there a more recent copy of the AppleEvents Registry than the
>Winter 1992 issue? That's all I found on the most recent dev. CD, and it
>seems pretty out of date.
Chuck,
I don't know of a whole new registry. There is an list of errata to the
Winter '92 registry (also on the CDs, I think), and a small erratum to the
errata (but nothing erotic).
There have been new suites defined, and registry sections for those are
here and there on the CDs: Word Services, Telephony, Table (I think new
since Winter '92), etc. And more are in the works.
If I don't see answers flow by regarding the events you ask about, I'll try
to find out what they are.
'ascr' suggests AppleScript...that's the AppleScript suite. 'syso' is a
sort of catch-all, which many of the AppleScript Scripting Additions use
when nothing else fits ("system operation" or something). 'misc' 'curd' is
old milk <sorry>.
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Sat, 9 Apr 1994 02:00:26 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: FaceSpam
>It is the new name for FrontMost. I don't know why they changed it.
The rumor I heard is that the Frontier people thought that the Frontmost
name was too close for comfort and complained. Go figure.
Jon
=========================================================================
Date: Sat, 9 Apr 1994 02:00:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Unknown Events
>AppleEvent Class = ascr, ID = gdut
GetData User Terminology. This is the event AppleScript sends to get your
aete resource. If an app isn't running it simply opens the app and does a
GetResource. If it is open, then it sends this event. Most apps don't
handle it and thus AppleScript's system event handler does. It calls
GetResource and returns the resource. Kind of slick.
These three are all standard scripting additions:
>AppleEvent Class = syso, ID = ntoc
ASCII character (String Commands)
>AppleEvent Class = misc, ID = curd
current date (Current Date)
>AppleEvent Class = ears, ID = lfdr
list folder (File Commands)
As for the Apple Event Registry, I was the Registrar, but they decided that
that job position wasn't needed and that the Registry was complete. I was
laid off last July. Nothing has or will be done to the Registry.
Apparently the OpenDoc people at CIL have publicly accepted responsibility
for the Registry, although they haven't done anything with it yet either.
Jon
=========================================================================
Date: Fri, 8 Apr 1994 04:41:03 LCL
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Rick Zeman <rick.zeman@HIS.COM>
Organization: Heller Info Services (info@his.com) Near DC
Subject: Haunted...
Got a weird one here, folks: at the end on a bunch of SITcomm AS 1.1 launch
scripts, I had a launch statement for a non-scriptable application (Rick
Holzgraffe's SignatureQuote).
I used an osax to see if it's running and if the result was false, I launched
it (not 'told' it). Worked like a champ.
Problem is now that I'm not using a 68000 anymore, I don't need to do that
anymore (don't ask). So I removed all of the statements from the scripts and
recompiled. BUT THE FREAKING THING STILL LAUNCHES EVERY TIME! even though
it's not being referred to at all.
Even a simple script like
tell application "SITcomm*"
activate
Connect "Twilight Clone"
end tell
causes it to launch.
I'm lost. What on earth is going on here?
___________________________________________________________________________
Rick Zeman "Wer nie sein Brot mit Tranen ass
rzeman@his.com Wer nie die kummervollen Nachte
Fidonet: 1:109/70.943 Auf seinem Bette weinend sas
Der kennt euch nicht, ihr himmlishcen Machte."
-- Goethe, "Wilhelm Meister"
=========================================================================
Date: Sun, 10 Apr 1994 13:16:06 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Benjamin Broder <bbroder@HSC.USC.EDU>
Subject: Script runs from ScriptEditor, not from FMPRO
I have a script that takes some information from
a Filemaker Pro record and creates a calendar entry
in NOW Up-To-Date corresponding to this information.
The script runs fine when I run it from the ScriptEditor,
but when I run it from Filemaker Pro, nothing happens (I
don't even get an error.)
I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
Applescript 1.0. I have the script working when I run
it from the Script Editor and in FMPro I created a FMPro
script that sends a "do script" event to my script (saved
as an application) with the text of the script being "run()".
Any ideas?
Ben
bbroder@hsc.usc.edu Benjamin Broder FAX (818) 457-4100
USC Institute for Health Promotion and Disease Prevention Research
1000 S. Fremont Ave. #641, Alhambra, CA 91803-1358 (818) 457-4029
=========================================================================
Date: Sun, 10 Apr 1994 17:02:38 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jeff Mealiffe <jmealif@EIS.CALSTATE.EDU>
Subject: Processing a bunch of files
I have a problem that I think can easily be solved using AppleScript, and
I would appreciate some pointers about how to get going. I need to read
the data out of about 6,000 text files and put the text from each file
into a single field in a FileMaker Pro 2.1v1 database. I already have
the AppleScript software and the scriptable text editor. I don't think I
can use the scriptable text editor to copy and paste because a few of the
files are more than 32K. Any ideas? Please respond to me directly, and
I'll summarize for the list.
Thanks in advance,
-jeff
Jeff Mealiffe Jeff.Mealiffe@netops.lewis.edu
Mac Consultant/Sys Admin jmealif@ctp.org
Lewis Junior High School, San Diego, Calif. jmealif@sierra.fwl.edu
** For Information About The Lewis Jr. High Educational Foundation, send **
** e-mail to lewis@cerf.net with a subject of "mailserv send foundation" **
** (without the quotes). The system will respond automatically. **
=========================================================================
Date: Sun, 10 Apr 1994 23:43:24 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Eudora & Notify event
AppleScripters:
I've got Eudora's Notify event figured out, but is there a way to determine
that Eudora has checked and found *no* new mail?
It seems like 'try'-ing with a timeout would only be useful if I could
determine the approximate time it takes to check for mail over the network.
Otherwise, I'd run the risk of either not waiting long enough or else
wasting time waiting to continue processing long after Eudora is finished.
Has anyone tried anything similar?
Thanks in advance.
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "Perhaps the most universal information trap is the...
System Administrator trap of forgetting what it's like not to know. The
CoVis Project minute we know something, we forget what it was like
Northwestern Univ. not to know it."
--Richard S. Wurman
E-mail: donovan@covis.nwu.edu "Information Anxiety"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Mon, 11 Apr 1994 13:07:12 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Allan Marcus <allan_marcus@LANL.GOV>
Subject: 'is app running' command?
Is there any way that I can determine if a specific app is running (via AS)?
Thanks,
---------------------------------------
Allan Marcus
Los Alamos National Laboratory
"My opinions are my own, I think..."
Voice: 505-665-1828
CIS: 76666,2113
AppleLink: Allan.Marcus
e-world/NewtonMail: Allan.M
InterNet: allan_marcus@lanl.gov <- note new address (deja vu!)
---------------------------------------
=========================================================================
Date: Mon, 11 Apr 1994 13:34:58 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: Re: 'is app running' command?
>Is there any way that I can determine if a specific app is running (via AS)?
Yes, there are two osaxen that can do this:
is application running, and list applications.
Is application running requires a string and returns boolean.
List applications returns a list of strings (which you can use in something
like
if (list applications) contains "<app to check for>"
)
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Mon, 11 Apr 1994 14:47:59 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Allan Marcus <allan_marcus@LANL.GOV>
When I run the following script (copied from the scripting the finder
document that came with AS 1.1), I get a "--> Source not available." error
message after selecting the finderlib file from the dialog. Am I doing
something wrong?
---
property finderLib : "null"
if class of finderLib =82 script then
set finderLib to load script (choose file with prompt =AC
"Where is the compiled script \"finderLib\"?" of type "osas"=
)
end if
---
Thanks,
---------------------------------------
Allan Marcus
Los Alamos National Laboratory
"My opinions are my own, I think..."
Voice: 505-665-1828
CIS: 76666,2113
AppleLink: Allan.Marcus
e-world/NewtonMail: Allan.M
InterNet: allan_marcus@lanl.gov <- note new address (deja vu!)
---------------------------------------
=========================================================================
Date: Mon, 11 Apr 1994 15:11:10 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Luis Muench <muench@SOLIX.FIU.EDU>
Subject: Re: 'is app running' command?
In-Reply-To: <9404111708.AA07655@fiu.edu>
Sorry 'bout the Subject line. New to this Unix thang, but I love this
PINE mail!! Anyways, is there a FAQ for this group (newbie here too)? I
read Info-Mac regularly, and have copped some of the AppleEvents progs and
like the power they concede! Is there a starter kit for Scripting that
wont put me in the red (a.k.a. Userland's Frontier)?
Thanx for your time.
--Luis
=========================================================================
Date: Mon, 11 Apr 1994 15:32:17 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Script runs from ScriptEditor, not from FMPRO
In-Reply-To: <no.id> from "Benjamin Broder" at Apr 10, 94 01:16:06 pm
--Benjamin Broder wrote:
>
>The script runs fine when I run it from the ScriptEditor,
>but when I run it from Filemaker Pro, nothing happens (I
>don't even get an error.)
Well, there is a very simple reason nothing happens when you try to
send the "run" command to the script from FM Pro. There's nothing to
send the do script even to. I'll explain this a little better below...
>I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
>Applescript 1.0. I have the script working when I run
>it from the Script Editor and in FMPro I created a FMPro
>script that sends a "do script" event to my script (saved
>as an application) with the text of the script being "run()".
If the script has been saved as an application, you can't send it a
do script event unless you have first sent it an open event. If the
script application isn't running there will be nothing that can receive
the event you want to send. Fortunately, all you need to do is send the
open application event to your script application from FM Pro. This is
one of the options on the event pop-up menu in FM Pro's Script Maker.
Making this change should slove your problems.
-Hades
=========================================================================
Date: Mon, 11 Apr 1994 15:38:56 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: 'is app running' command?
In-Reply-To: <no.id> from "Luis Muench" at Apr 11, 94 03:11:10 pm
--Luis Muench wrote:
>
>Sorry 'bout the Subject line. New to this Unix thang, but I love this
>PINE mail!! Anyways, is there a FAQ for this group (newbie here too)? I
>read Info-Mac regularly, and have copped some of the AppleEvents progs and
>like the power they concede! Is there a starter kit for Scripting that
>wont put me in the red (a.k.a. Userland's Frontier)?
If you are looking for a real scripting starter's kit, there are a
couple of options for you. First of all you can buy the AppleScript
Scripter's Kit from Apple (costs $144.95 from MacConnection). It comes
with a really good set of manuals, including a pretty good Getting
Started with AppleScript guide. The other choice is to buy one of the
AppleScript books: Tao of AppleScript or Complete AppleScript Handbook.
Both of these are supposed to be good for the novice scripter. If you
have any kind of programming background, especially something like
Hypercard, picking up AppleScript is pretty easy.
-Hades
=========================================================================
Date: Mon, 11 Apr 1994 15:29:53 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: new file on gaea
I have placed Allan Crump's Date Convert library on gaea in
ftp://applescript/scripts/DateConvert.sit.hqx
It converts Applescript date and date-times to Julian integers and reals
(respectively) for use in calculations where a julian date is needed.
Enjoy.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Mon, 11 Apr 1994 18:51:16 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Allan Marcus <allan_marcus@LANL.GOV>
Subject: Pause?
Anyone know how to pause a script during runtime? Here's the situation:
I am sendind an FTP fetch request to Anarchie. The file is retreived fine
via anarchie, and then anarchie launches stuffit expander to decompress.
Unfortunatley, the applescript is considered done as soon as the download
is complete, not when stuffit is done! I figure I can do something like
this:
if (is application ruinning("Stuffit")) then
pause for a few seconds
end if
So, how do I pause with out eating cpu time?
Any other ideas?
thanks,
Allan
---------------------------------------
Allan Marcus
Los Alamos National Laboratory
"My opinions are my own, I think..."
Voice: 505-665-1828
CIS: 76666,2113
AppleLink: Allan.Marcus
e-world/NewtonMail: Allan.M
InterNet: allan_marcus@lanl.gov <- note new address (deja vu!)
---------------------------------------
=========================================================================
Date: Mon, 11 Apr 1994 16:50:36 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: Pause?
Allan Marcus wrote:
>Anyone know how to pause a script during runtime? Here's the situation:
>
>I am sendind an FTP fetch request to Anarchie. The file is retreived fine
>via anarchie, and then anarchie launches stuffit expander to decompress.
>Unfortunatley, the applescript is considered done as soon as the download
>is complete, not when stuffit is done! I figure I can do something like
>this:
>
>if (is application ruinning("Stuffit")) then
> pause for a few seconds
>end if
>
>So, how do I pause with out eating cpu time?
You need to do something like the following. It requires that the script
is saved as a stay-open application so that you can use the idle..end idle
handler. This lets you define a "wait period" in seconds that the script
will wait (and not eat CPU time) before repeating the loop. It's the only
way I know of that you can pause without eating up CPU time.
general format:
global i
set i to 1
on idle
if i = 1 then
<do the first thing>
set i to i + 1
else if i = 2 then
if <a condition is satisfied> then
set i to i + 1
end if
else if i = 3 then
<do whatever you want after condition is satisfied>
quit
end if
return n -- n must be an integer representing the no. of seconds that
the script pauses before repeating the loop
end idle
For your example:
global i
set i to 1
on idle
if i = 1 then
<section telling Anarchie to do stuff>
set i to i + 1
else if i = 2
if (list applications) does not contain "Stuffit" then
set i to i + 1
end if -- It keeps checking if Stuffit is running every 2 seconds
and doesn't proceed until Stuffit stops running
else if i = 3
<whatever you want to do after Stuffit is finished>
quit
end if
return 2 -- wait 2 seconds (without eating CPU time) before
-- repeating the loop -- change to whatever idle time you like
end idle
Hope this helps
Dave
------------------------------------------------------------------------------
David Ray Dream Designs Music Composition
daver@netcom.com PO Box 5631 Interactive Multimedia
510-527-9010 Berkeley CA 94705 Virtual Worlds
=========================================================================
Date: Mon, 11 Apr 1994 20:17:57 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: William Cook <wrc@NETCOM.COM>
Subject: Re: MACSCRPT Digest - 9 Apr 1994 to 10 Apr 1994
>From: Benjamin Broder <bbroder@HSC.USC.EDU>
>Subject: Script runs from ScriptEditor, not from FMPRO
>...
>I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
>Applescript 1.0. I have the script working when I run
>it from the Script Editor and in FMPro I created a FMPro
>script that sends a "do script" event to my script (saved
>as an application) with the text of the script being "run()".
>
>Any ideas?
I think that the problem may be the difference between
"do script" and "run". In AppleScript, "run" is equivalent
to "double-click on an application" in the finder, which
is equivalent to "OAPP" in Apple Event terminology.
Do Script is something else. Soooo.. Either have FileMaker
send some other event, or put "on Do Script()" into your
script.
Just a guess...
-William Cook
BAM! Software, Inc.
=========================================================================
Date: Mon, 11 Apr 1994 23:50:13 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Manuel Veloso <veloso@NETCOM.COM>
Subject: osax returning result & error?
Hi all,
I'm trying to write a few osaxen, and have come up with kind of a problem.
The osaxen in question are for DAM/DAL, and one of them has the potential
to return real data, as well as an error code (DBGetQueryResults). The
function itself returns an error if there's not enough memory for the whole
result, but also should return the results that were retrieved.
Right now, I'm returning the results of the query in the direct object,
with the error code being stuffed into the keyErrorNumber parameter. Is
this kosher? Is there some other way to do this? I suppose that DBState
should return the fact that data is waiting, but as the DAL server is far
away (I go about once or twice a week), I can't test this for sure.
Manuel
=========================================================================
Date: Tue, 12 Apr 1994 01:18:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
I have uploaded the newest versions of these three programs to
ftp://gaea.kgs.ukans.edu/incoming. Hopefully they will show up
somewhere in the applescript directory shortly.
These are *free* programs, part of the AWOL Utilities package
recently uploaded to sumex and other sites. (Other sites don't
have these most recent versions, though.)
With this software, you can control even non-scriptable applications,
local or remote, through their menu commands. There's an 'osax' so
you can write scripts, and an entertaining application (Menu Grabber)
that uses Menu Events to reach out and grab a working copy of a
target application's menu bar. All that is required of the target is
that it be Apple-event-aware (support program linking). Note: There
are exceptions, including ResEdit, TeachText, and Finders prior to
7.1.2. (Notice a pattern?)
The programs are fully documented; it's not necessary to have a copy
of Help on Wheels to read the help files, but it helps. :-)
Package contents are as follows:
Menu_Events_1.1.1.sit.Hqx
Menu Events -- system extension supporting system event handler
Menu Events Help -- Help on Wheels help file
Menu Events Scripting Addition -- 'osax' dictionary
Menu Events Sample Script -- sample AppleScript menu control script
Menu Events.h -- MPW C header file for programmers
Menu_Grabber_1.1.1.sit.Hqx
Menu Grabber -- application supporting remote control via menus
Menu Grabber Help -- Help on Wheels help file
Help_on_Wheels_1.1.sit.Hqx
Help on Wheels -- generic help server
Read the "About AWOL Utilities 1.1.1" file in each archive for more
info on the AWOL Utilities package.
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Tue, 12 Apr 1994 08:40:05 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Sean M. Joyce" <sjoyce@HEIDELBERG.EDU>
Subject: Anarchie/AppleScript/PPC Question
Please forgive me if this has been asked before or if this is not the
appropriate forum, but I am new to both Anarchie and this list.
Setup is this: Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
Problem is this: when I try to run the "Get Files" script to use Anarchie
to download files from an info-mac mirror, the machine bombs with a message
to the effect of "Floating point coprocessor not installed."
I understand that, in emulation, the PowerMacs do not provide an FPU. Does
one of these programs require it, or is it simply an incompatibility
between these programs and the emulator?
TIA for any help.
--
Sean Joyce
sjoyce@heidelberg.edu
=========================================================================
Date: Tue, 12 Apr 1994 06:08:32 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: network_manager@ALDUS.COM
Organization: Aldus Corporation, Seattle, WA
Subject: NDN:Anarchie/AppleScript/PPC Question
Your mail to the Microsoft Mail Server could not be fully
delivered! No Valid Addresses! It has been deleted.
Error List:
Bad 'To:' Address: david.rogers@MSM-Inter
=========================================================================
Date: Tue, 12 Apr 1994 09:54:03 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Re: pause
an easier way to pause a script is in this format:
repeat until <condition>
end repeat
in your case, you would want to put "(is application running(stuffit)) is
false"
in the place of <condition>. this will make your script do nothing until
stuffit is not running.
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Tue, 12 Apr 1994 09:48:52 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Luis Muench <muench@SOLIX.FIU.EDU>
Subject: Re: 'is app running' command?
In-Reply-To: <9404111944.AA18677@fiu.edu>
Thanx for your reply, Hades...
For the benefit of those that may be lurking or would feel
embarased to ask a stupid question: Are there any scripting environments
that are of a Shareware nature?! Anything comprable to commercial
offerings? I love it when I see a product advertised with x,y, and z
features and they turn out to be the same features I've been using from
shareware sources for a fraction of the cost.
--Luis Muench
On Mon, 11 Apr 1994, Brian V. Hughes wrote:
> --Luis Muench wrote:
> >
> >Sorry 'bout the Subject line. New to this Unix thang, but I love this
> >PINE mail!! Anyways, is there a FAQ for this group (newbie here too)? I
> >read Info-Mac regularly, and have copped some of the AppleEvents progs and
> >like the power they concede! Is there a starter kit for Scripting that
> >wont put me in the red (a.k.a. Userland's Frontier)?
>
> If you are looking for a real scripting starter's kit, there are a
> couple of options for you. First of all you can buy the AppleScript
> Scripter's Kit from Apple (costs $144.95 from MacConnection). It comes
> with a really good set of manuals, including a pretty good Getting
> Started with AppleScript guide. The other choice is to buy one of the
> AppleScript books: Tao of AppleScript or Complete AppleScript Handbook.
> Both of these are supposed to be good for the novice scripter. If you
> have any kind of programming background, especially something like
> Hypercard, picking up AppleScript is pretty easy.
>
> -Hades
=========================================================================
Date: Tue, 12 Apr 1994 06:54:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: osax returning result & error?
>I'm trying to write a few osaxen, and have come up with kind of a problem.
>The osaxen in question are for DAM/DAL, and one of them has the potential
>to return real data, as well as an error code (DBGetQueryResults). The
>function itself returns an error if there's not enough memory for the whole
>result, but also should return the results that were retrieved.
>
>Right now, I'm returning the results of the query in the direct object,
>with the error code being stuffed into the keyErrorNumber parameter. Is
>this kosher? Is there some other way to do this? I suppose that DBState
>should return the fact that data is waiting, but as the DAL server is far
>away (I go about once or twice a week), I can't test this for sure.
Returning a result and an error code is just fine. The AppleScript error
reporting system allows a AppleEvent (which is used to execute your OSAX)
to return both. Scripts which receive this type of error need to look at
the "partial result" to see what data was returned in addition to the
error.
-Mark
=========================================================================
Date: Tue, 12 Apr 1994 06:54:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: Pause?
>Date: Mon, 11 Apr 1994 18:51:16 -0500
>From: Allan Marcus <allan_marcus@LANL.GOV>
>Subject: Pause?
>
>Anyone know how to pause a script during runtime? Here's the situation:
>
>I am sendind an FTP fetch request to Anarchie. The file is retreived fine
>via anarchie, and then anarchie launches stuffit expander to decompress.
>Unfortunatley, the applescript is considered done as soon as the download
>is complete, not when stuffit is done! I figure I can do something like
>this:
>
>if (is application ruinning("Stuffit")) then
> pause for a few seconds
>end if
>
>So, how do I pause with out eating cpu time?
>
>Any other ideas?
>
>thanks,
>
>Allan
How about a different approach. Write a second script which Anarchie can
call instead of StuffIt. This script could then call StuffIt, and then
carry on processing once the file has been processed.
-Mark
=========================================================================
Date: Tue, 12 Apr 1994 10:28:17 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Re: Anarchie/AppleScript/PPC Question
>Problem is this: when I try to run the "Get Files" script to use Anarchie
>to download files from an info-mac mirror, the machine bombs with a message
>to the effect of "Floating point coprocessor not installed."
>
>I understand that, in emulation, the PowerMacs do not provide an FPU. Does
>one of these programs require it, or is it simply an incompatibility
>between these programs and the emulator?
I don't know. I can't see why Anarchie would be using floating point, and
if it were I can't see why it would be going directly to the coprocessor.
However, I've had absolutely no success with Anarchie's scripts and I'm
using a Quadra 700 and AppleScript 1.1. I think that Anarchie's scripts
are incompatible with AS 1.1, but I'm just guessing. Anyone else had
problems with these scripts? They use low level AppleEvents, and it just
looks like gibberish to me. I presume this is the root of the problem.
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Tue, 12 Apr 1994 10:48:09 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Shareware scripting environments...
In-Reply-To: <no.id> from "Luis Muench" at Apr 12, 94 09:48:52 am
--Luis Muench wrote:
>
>Thanx for your reply, Hades...
No problem.
> For the benefit of those that may be lurking or would feel
>embarased to ask a stupid question: Are there any scripting environments
>that are of a Shareware nature?! Anything comprable to commercial
>offerings?
Currently there aren't any. The closest is a scripting environment
for MPW written by Jon Pugh. I don't think Jon charges anything for his
scripting set-up, but when you have to pay upwards of $1000 for MPW...
>I love it when I see a product advertised with x,y, and z features and
>they turn out to be the same features I've been using from shareware
>sources for a fraction of the cost.
Amen.
-Hades
=========================================================================
Date: Tue, 12 Apr 1994 08:13:01 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Anarchie/AppleScript/PPC Question
>Please forgive me if this has been asked before or if this is not the
>appropriate forum, but I am new to both Anarchie and this list.
>
>Setup is this: Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
>
>Problem is this: when I try to run the "Get Files" script to use Anarchie
>to download files from an info-mac mirror, the machine bombs with a message
>to the effect of "Floating point coprocessor not installed."
>
>I understand that, in emulation, the PowerMacs do not provide an FPU. Does
>one of these programs require it, or is it simply an incompatibility
>between these programs and the emulator?
I run Anarchie 1.1.3 on my Power Mac 8100/80. I also run AppleScript 1.1,
although I use Frontier to script Anarchie. I have no problems running
Anarchie on my 8100. And the two trials I did make using AppleScript went
fine (although it wasn't the script you mention).
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 12 Apr 1994 08:31:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: pause
>an easier way to pause a script is in this format:
>
>repeat until <condition>
>
>end repeat
>
>in your case, you would want to put "(is application running(stuffit)) is
>false"
>in the place of <condition>. this will make your script do nothing until
>stuffit is not running.
This will work, but try to do something processor-intensive during the pause
and it won't get done. This sucks too much CPU power. Perhaps the degree
to which it sucks CPU time is related to which machine is used. I have a
Powerbook 100, and this is a significant issue. Perhaps on a Quadra or PPC
this is not such a big issue.
An example is downloading a file with ZTerm using an Applet (stay-open
Applescript App) in the background. The transfer rate is inversely proportional
to the CPU time being sucked by the Applet. Other examples of processor-
intensive tasks would be stuffing a large file, transfering a file with
Anarchie, watching a Quicktime movie, etc..
The on idle..end idle puts the least burden on the CPU.
-Dave
------------------------------------------------------------------------------
David Ray Dream Designs Music Composition
daver@netcom.com PO Box 5631 Interactive Multimedia
510-527-9010 Berkeley CA 94705 Virtual Worlds
=========================================================================
Date: Tue, 12 Apr 1994 10:55:29 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: fw:Menu Events, Menu Grabber,
Help on Wheels at gaea.kgs.ukans.edu
In-Reply-To: Your message of "Tue, 12 Apr 94 01:20:00 EDT"
Hi everyone,
>Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
>
>I have uploaded the newest versions of these three programs to
>ftp://gaea.kgs.ukans.edu/incoming. Hopefully they will show up
>somewhere in the applescript directory shortly.
You'll now find these in
ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.1.sit.Hqx
ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.1.sit.Hqx
ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
ftp://gaea.kgs.ukans.edu/applescript/addons/Help_on_Wheels_1.1.sit.Hqx
{How bout that, John :-}
pf
=========================================================================
Date: Tue, 12 Apr 1994 14:58:35 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
Subject: None
REV MACSCRIPT BY userid
=========================================================================
Date: Tue, 12 Apr 1994 12:32:40 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Compton <compton@PTOLEMY.ARC.NASA.GOV>
Subject: frontmost droplets?
Hi all,
I'm just beginning to play with FrontMost and have found that adding an
"on open" handler to a Project Script may not always make the a subsequent
saved app "droppable". Sometimes it does and sometimes it doesn't (although
the icon will have the little down-arrow).
Can anyone comment on whether it's a known problem or if I'm doing something
wrong?
Thanks,
-Michael Compton
compton@ptolemy.arc.nasa.gov
=========================================================================
Date: Tue, 12 Apr 1994 15:37:22 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
Subject: Re: Menu Events, Menu Grabber,
Help on Wheels at gaea.kgs.ukans.edu
+Menu_Grabber_1.1.1.sit.Hqx
+ Menu Grabber -- application supporting remote control via menus
+ Menu Grabber Help -- Help on Wheels help file
Menu Grabber is way kewl. But iwas just able to restart my
colleagues mac, without he coming to know about. Aren't we
talkin a major security hole here? I know I know, u can turn
off your filesharin/linkin...but thats not what i am lookin at...
Finder AE's like restart/shutdown should be disabled...
Just my 187.348 roubles (approx US$0.02)
__ __
Marilyn Monroe
Bring Back the Goddess Inc.
Don't tell me later that folks in Temple think the same way
folks in Heaven do.
=========================================================================
Date: Tue, 12 Apr 1994 16:20:15 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Luis Muench <muench@SOLIX.FIU.EDU>
Subject: Re: Menu Events, Menu Grabber,
Help on Wheels at gaea.kgs.ukans.edu
In-Reply-To: <9404121941.AA01285@fiu.edu>
Norma Jean, your money not good here! BTW, AppleEvents should *NOT* be
disabled in the Finder ==> BUT you should have the _option_ to have YOUR
finder accept/not AE's.
Just my $60.00 pesos worth, y que viva Mexico...
On Tue, 12 Apr 1994, The Goddess Lives wrote:
> +Menu_Grabber_1.1.1.sit.Hqx
> + Menu Grabber -- application supporting remote control via menus
> + Menu Grabber Help -- Help on Wheels help file
>
> Menu Grabber is way kewl. But iwas just able to restart my
> colleagues mac, without he coming to know about. Aren't we
> talkin a major security hole here? I know I know, u can turn
> off your filesharin/linkin...but thats not what i am lookin at...
>
> Finder AE's like restart/shutdown should be disabled...
> Just my 187.348 roubles (approx US$0.02)
> __ __
> Marilyn Monroe
> Bring Back the Goddess Inc.
>
> Don't tell me later that folks in Temple think the same way
> folks in Heaven do.
=========================================================================
Date: Tue, 12 Apr 1994 19:15:42 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Manuel Veloso <veloso@NETCOM.COM>
Subject: Class of parameter '****'
yet another question...
I have an osax that will need to accept a parameter of any class
(typeAnyType). There doesn't seem to be a way, though, to get this type
within an osax. Another way would be to pass the type of the object as
another parameter (ie: DAMSendItem dataItem theItem itemClass (class of
theItem), but it seems kind of like a kludge. Is there some supported way
to do this?
Manuel
=========================================================================
Date: Tue, 12 Apr 1994 21:21:59 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Class of parameter '****'
>yet another question...
>
>I have an osax that will need to accept a parameter of any class
>(typeAnyType). There doesn't seem to be a way, though, to get this type
>within an osax. Another way would be to pass the type of the object as
>another parameter (ie: DAMSendItem dataItem theItem itemClass (class of
>theItem), but it seems kind of like a kludge. Is there some supported way
>to do this?
There are a couple of ways to extract a parameter of unknown type from an
Apple event. [Remember, your osax is just an event handler routine.] If
you ask for the parameter using AEGetParamDesc (), specifying a desired
type of typeWildCard (aka '****'), you get the parameter as it is in the
event...no coercion. You can then look at the descriptorType field in the
descriptor you got back, and decide what to do.
An alternative is to ask for the parameter with AEGetParamPtr (), again
specifying typeWildCard, but specifying a maximum length of zero. You'll
get an error (except in the degenerate case of a 'null' parameter, or a
true or false of the data-less sort), but you'll also receive the actual
size and actual type, and can then decide what to do.
If you want the parameter no matter what it is, the former method may make
more sense. If you only will accept certain types, and reject others, and
the types you will accept can easily be gotten using AEGetParamPtr (),
possibly with coercion, you can save some memory management overhead by
using the latter method.
There are other options, too, depending upon what your osax considers
"legal" input...if you're willing to accept any numeric which can be
coerced to a long, for instance, just ask for a long. That will even work
if the caller has passed the string "1234".
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 12 Apr 1994 23:37:17 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Stuff
>> For the benefit of those that may be lurking or would feel
>>embarased to ask a stupid question: Are there any scripting environments
>>that are of a Shareware nature?! Anything comprable to commercial
>>offerings?
>
> Currently there aren't any. The closest is a scripting environment
>for MPW written by Jon Pugh. I don't think Jon charges anything for his
>scripting set-up, but when you have to pay upwards of $1000 for MPW...
Unfortunately, my RunScript MPW tool is simply a compiler for OSA
languages. It does nothing without AppleScript (which implements the OSA
_and_ an OSA client). It does provide some features above the Script
Editor, but doesn't have some that it does.
There is an OSA language based on the unix tcl, but it only does file stuff
and it STILL requires AppleScript to implement the OSA. Given the work
involved in writing AppleScript, it will quite some time before anyone
implements a shareware version of a decent scripting language that uses
aetes and all.
>I have an osax that will need to accept a parameter of any class
>(typeAnyType). There doesn't seem to be a way, though, to get this type
>within an osax. Another way would be to pass the type of the object as
>another parameter (ie: DAMSendItem dataItem theItem itemClass (class of
>theItem), but it seems kind of like a kludge. Is there some supported way
>to do this?
Here's one:
AEGetParamPtr(&theAppleEvent,
theAEKeyword,
desiredType, <-- the type you want (or typeWildCard)
&typeCode, <-- the actual type before coercion
dataPtr,
maximumSize, <-- use 0 here to skip the data
&actualSize);
Here's another:
AESizeOfParam(&theAEEvent,
theAEKeyword,
&typeCode, <-- the type of the parameter
&dataSize);
Jon
=========================================================================
Date: Wed, 13 Apr 1994 14:51:43 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Peter N Lewis <peter.lewis@INFO.CURTIN.EDU.AU>
Subject: Re: Anarchie Question
[Note: I don't read this list (it's too much to wade thru and I'm busy
working on a dozen projects), but I have very efficient front end
processors for the list so I'll try to respond to any queries about
Anarchie, though you might be better to cc me when posting such queries]
>Setup is this: Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
I've tested Anarchie briefly on the PowerMacs, and it seems to work fine,
though I didn't try out the AppleScripts. Anarchie does not use floating
point anywhere.
>I don't know. I can't see why Anarchie would be using floating point, and
>if it were I can't see why it would be going directly to the coprocessor.
>However, I've had absolutely no success with Anarchie's scripts and I'm
>using a Quadra 700 and AppleScript 1.1.
The scripts distributed with Anarchie are in 1.1 format and should work ok.
I can mail anyone the scripts in text format if they're interested. The
quit event had a problem (it was in the wrong suite), and I think the
cut/copy/etc events are also in the wrong suite.
In any event, Anarchie scripting is pretty trivial, you should be able to
write your own from scratch or by refering to the docs file fairly easily.
tell application "Anarchie"
with timeout of 5 * 60 seconds
find "dehqx" server "archie.internic.net" matches 20 with window
fetch file "HD:black-cat-startup.hqx" host "sumex-aim.stanford.edu"
path "/info-mac/grf/black-cat-startup.hqx"
list file "HD:listing" host "sumex-aim.stanford.edu" path "/info-mac"
store file "HD:file" host "sumex-aim.stanford.edu" path "/incoming"
fetch url "sumex-aim.stanford.edu:/info-mac/grf/black-cat-startup.hqx"
end timeout
end tell
Enjoy,
Peter.
_______________________________________________________________________
Peter N Lewis <peter.lewis@info.curtin.edu.au> Ph: +61 9 368 2055
=========================================================================
Date: Wed, 13 Apr 1994 00:35:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: Menu Events, Menu Grabber,
Marilyn Monroe wrote:
>+Menu_Grabber_1.1.1.sit.Hqx
>+ Menu Grabber -- application supporting remote control via menus
>+ Menu Grabber Help -- Help on Wheels help file
>
>Menu Grabber is way kewl. But iwas just able to restart my
>colleagues mac, without he coming to know about. Aren't we
>talkin a major security hole here? I know I know, u can turn
>off your filesharin/linkin...but thats not what i am lookin at...
>
>Finder AE's like restart/shutdown should be disabled...
>Just my 187.348 roubles (approx US$0.02)
Major hole! There's a whole section in Menu Events Help that talks
about this issue. (Just to clarify, Menu Events and Menu Grabber don't
use Finder AE's like 'FNDR'/'rest', but you can tell them to select a
menu item in Finder called "Restart".)
If you have Menu Events installed, here's how to protect yourself
against Marilyn and her kind:
1. Turn off Program Linking in Sharing Setup, so that Menu Events and
Menu Grabber will only work locally; or
2. Deny guests the privilege of linking to programs on your Mac; or
3. Use a particular application's Sharing dialog to turn off remote
program linking (does this work on 7.1.2's Finder?); or
4. Lock the Menu Events extension file (startup icon will reflect this
change), so that only applications running in kAEInteractWithAll
mode will accept a Select Menu Item event from a remote sender.
I doubt there are many non-scriptable applications which choose to
run in this mode, or which let you select this mode through GUI.
kAEInteractWithLocal is the default, and Menu Events cleverly
overrides that setting if you don't lock it - hence the hole!
Happy grabbing,
Ross
--
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Wed, 13 Apr 1994 08:54:19 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: William Murphy <wmurphy@CBRC-A12.MGH.HARVARD.EDU>
Subject: ARA
ok, does anyone know how to send an event to ARA that tells it to answer
the phone or not to answer the phone. I found a raw event called answ using
AETracker but it only seemed to find it once and I can't seem to duplicate it.
I know that ARA does not officially recognize apple events but if there is
a way...
I am currently using Quickkeys to accomplish my goals but I am a purest...
Bill
=========================================================================
Date: Wed, 13 Apr 1994 08:56:12 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: William Murphy <wmurphy@CBRC-A12.MGH.HARVARD.EDU>
Subject: oh yea, and the network cdev
I also want a way to use Apple events to change from local talk to ether
with out opening the network control panel...
Bill
=========================================================================
Date: Wed, 13 Apr 1994 10:19:48 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Re: Shareware scripting environments...
well, Tickle is sort of a scripting language. it includes 2 OSA scripting
languages, J-APL and TCL. i think it is at gaea as
"applescript/scriptableapps/tickle.hqx" or something like that.
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Wed, 13 Apr 1994 10:51:26 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Brown <dlb1@SEQUOIA.LLE.ROCHESTER.EDU>
Subject: Example Eudora Scripts
Greetings,
I'm looking for AppleScript examples to control Eudora 1.4.2. I
found a short example somewhere but it doesn't seem to work properly (I'm
using AS 1.0 with the various bits from The Tao...). Does anyone have an
actual working script that does something like beep twelve times when
mailings from this list show up, or save TidBITS mailings in a folder with
an EasyView viewer? My running Applet or Droplet, or watever it's called,
gets a notification event, but I can't seem to get the new message data
that Eudora is supposed to pass. If you're too shy to post your
imperfect script please email. Any help is appreciated.
--Dave
=========================================================================
Date: Wed, 13 Apr 1994 11:27:05 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Luis Muench <muench@SOLIX.FIU.EDU>
Subject: Restarting remote mac
Is there any way to restart a remote mac (assuming you have all the proper
access privs) without having to deal with extensions that need a restart in
the first place?
I have come across some pretty cool software that allows you to
either restart, shut down, or turn off/on filesharing remotely. I use
these to leave my mac on at work on Friday, and if I so desire, I can ARA
from home and switch my mac off or do a restart. But the caveat exists
that I must pre-install the extensions that would do this. Would it be
possible to have some sort of script that you could launch on a remote mac
and it would send a local restart command, thus avoiding the above caveat?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<<<<<<Reality is anything that cannot be undone or avoided
>>>>>>Luis Muench -- muench@solix.fiu.edu
=========================================================================
Date: Wed, 13 Apr 1994 11:32:08 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: K J Fox <kjfox@MKE.AB.COM>
Subject: FaceSpan - FrontMost
Pardon me if this question has been asked:
MacWeek indicates that FaceSpan is a newer version
of FrontMost. How does one get it if I already own
FrontMost, and does it cure the memory leak spoken
of a few weeks ago?
Thanks!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Kenneth J. Fox
Rockwell Automation - Allen Bradley Co.
Milwaukee, WI (414)382-3287 Voice
kjfox@mke.ab.com
=========================================================================
Date: Wed, 13 Apr 1994 12:40:39 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: FaceSpan - FrontMost
In-Reply-To: <no.id> from "K J Fox" at Apr 13, 94 11:32:08 am
--K J Fox wrote:
>
>MacWeek indicates that FaceSpan is a newer version of FrontMost. How
>does one get it if I already own FrontMost, and does it cure the memory
>leak spoken of a few weeks ago?
We won't know any of this until Software Designs Unlimited, the
makers of FaceSpan (Frontmost - note correct spelling), officially
release FaceSpan as a product. Currently, you can only get Frontmost,
and only when you buy either the AppleScript Scripter's Kit or the
AppleScript Developer's Toolkit.
-Hades
=========================================================================
Date: Wed, 13 Apr 1994 12:18:21 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: Restarting remote mac
>Is there any way to restart a remote mac (assuming you have all the proper
>access privs) without having to deal with extensions that need a restart in
>the first place?
> I have come across some pretty cool software that allows you to
>either restart, shut down, or turn off/on filesharing remotely. I use
>these to leave my mac on at work on Friday, and if I so desire, I can ARA
>from home and switch my mac off or do a restart. But the caveat exists
>that I must pre-install the extensions that would do this. Would it be
>possible to have some sort of script that you could launch on a remote mac
>and it would send a local restart command, thus avoiding the above caveat?
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
><<<<<<Reality is anything that cannot be undone or avoided
>>>>>>>Luis Muench -- muench@solix.fiu.edu
As a shameless plug for a company I am involved with, There is a hardware
device called the PowerSwitch LT that can control power to a Mac and send
an ADB toggle via a LocalTalk connection. It is a network device
independent of the device whos power it controls. You can control it with
HyperCard XCMDs and it would be pretty easy to tell a HyperCard stack to
start or power off a remote Mac via a network connection and AppleScript.
They are:
Radiant@applelink.apple.com
The PowerSwitch LT is somewhere under $200 or so.
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Wed, 13 Apr 1994 16:12:50 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Re: Restarting remote mac
>The PowerSwitch LT is somewhere under $200 or so.
>
>Kee Nethery
Kee - is this related to that device that adds soft power-on power-off to
Macs without it? If so, can you tell me something about that product? (I
thought it was a LOT cheaper then $200!) Also, does it work with PowerMacs
now, and is your company planning a "fat binary" version so that it doesn't
slow down the PowerMacs (as recently reported in several magazines, non
"fat-binary" extensions on PowerMacs can cause SIGNIFICANT slowdowns -
about 20 to 30% for AfterDark alone!)
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Wed, 13 Apr 1994 16:14:29 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Re: Restarting remote mac
Oops - sorry about that folks. I had intended to send that question about
the PowerKey directly to Kee. Sorry about sending it to the world....
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Wed, 13 Apr 1994 16:57:00 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "William J. Jamison" <jami1@AOL.COM>
Subject: Re: Restarting remote mac
Another shameless plug. Farallon will love me.
Timbuktu Remote in conjunction with their 9600 baud V.32 modem (a package
deal)comes with a modem cord that has an extra little pigtailed cord on the
mini-din end that plugs into the ADB port (if you have a spare). This enables
you to call in to _some_ sleeping Macs (no longer works on my AV, for one
thing I gave up my Farallon modem in favor of the GeoPort, not much sense in
tying up 2 modems) and wake them up. If you could just get hold of the
cord...? Maybe.
=========================================================================
Date: Wed, 13 Apr 1994 17:51:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: Restarting remote mac
>Is there any way to restart a remote mac (assuming you have all the proper
>access privs) without having to deal with extensions that need a restart in
>the first place?
> I have come across some pretty cool software that allows you to
>either restart, shut down, or turn off/on filesharing remotely. I use
>these to leave my mac on at work on Friday, and if I so desire, I can ARA
>from home and switch my mac off or do a restart. But the caveat exists
>that I must pre-install the extensions that would do this. Would it be
>possible to have some sort of script that you could launch on a remote mac
>and it would send a local restart command, thus avoiding the above caveat?
This works for me in System 7.1, even though the Finder's not scriptable yet:
tell application "Finder" to <<event FNDRrest>> -- substitute guillemots for <>
Save that script as an application, then use a Finder event to launch this
application from wherever you're sitting. (Open Selection can be run from
a remote Mac, but Restart can't.) If any application puts up a prompt dialog
when told to quit, you're stuck, unfortunately, though you could try using
the Autotype 'osax' to pump a stream of "Enter" keystrokes at these dialogs.
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Wed, 13 Apr 1994 18:25:09 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Gustavo Benzecri <gbenze@CONICIT.VE>
Subject: Re: Example Eudora Scripts
>Greetings,
> I'm looking for AppleScript examples to control Eudora 1.4.2. I
>found a short example somewhere but it doesn't seem to work properly (I'm
>using AS 1.0 with the various bits from The Tao...). Does anyone have an
>actual working script that does something like beep twelve times when
>mailings from this list show up, or save TidBITS mailings in a folder with
>an EasyView viewer? My running Applet or Droplet, or watever it's called,
>gets a notification event, but I can't seem to get the new message data
>that Eudora is supposed to pass. If you're too shy to post your
>imperfect script please email. Any help is appreciated.
>
>--Dave
The following is a short script I wrote some days ago that helps me to
classify the incoming mail into selected Eudora's mailboxes according to a
pattern in the sender field:
-------- script begins here --------
set fieldLabel to "sender"
set rules to {{"MACSCRPT", "AppleScript"}, {"4d@", "4th-Dimension"}}
tell application "Eudora"
activate
repeat with m from (count message of mailbox "in" of mail folder "") to 1 by
-1
set theMessage to (a reference to message m of mailbox "in" of mail folder
"")
try
set fieldSender to field fieldLabel of theMessage
set proceed to true
on error
set proceed to false
end try
if proceed then
repeat with theRule in rules
if fieldSender contains item 1 of theRule then
try
set mailFolder to (a reference to mail folder (item 3 of theRule))
on error
set mailFolder to (a reference to mail folder "")
end try
move theMessage InsertHere end of mailbox (item 2 of theRule) of
mailFolder
exit repeat
end if
end repeat
end if
end repeat
end tell
-------- script ends here --------
The "rules" field guides the script to what to do with the incoming mail.
In the example above all mail with "MACSCRPT" anywhere in the sender field
goes to the "AppleScript" mailbox and all the mail with "4d@" goes to the
"4th-Dimension" mailbox. You can define a third field if the target mailbox
is inside a mail folder.
I think the script could be modified to store text files such as the
TidBITS mailings simply replacing the "move" command with a "save" command
and adding a folder path string to the rules.
Hope this helps,
-- Gustavo
=========================================================================
Date: Wed, 13 Apr 1994 16:30:34 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mel Walker <mwalker@NETCOM.COM>
Subject: Finding the sender of an event from AppleScript
Given the following script, how do I find out the address of the sender of
the event?
on <<event testdisp>>(x)
return (display dialog x)
end <<event testdisp>>
I want to be able to send another event back at the sender. Can anyone help
me do this?
BTW, are these kind of things documented in the AppleScript kit from APDA?
I only have the runtime.
Thanks,
--Mel Walker
--
Mel Walker mwalker@netcom.com
"Actually, I just like to say the word 'Smock.' Smock Smock Smock Smock
Smock Smock Smock!" - Hobbes
=========================================================================
Date: Thu, 14 Apr 1994 09:46:36 +0730
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tan Jin Ho <jinho@NCB.GOV.SG>
Subject: Re: Example Eudora Scripts
Here's something you might find helpful. It's from a kind soul on the net.
-----------------------
--this script shows how to get Eudora to send mail or move messages around.
--
tell application "Eudora"
make new Message at end of Mailbox "Out" of Mail Folder ""
set Field "Subject" of Message 1 of Mailbox "out" of Mail Folder ""
to "This is a dead parrot."
--you also might want these:
set Field "To" of Message 1 of Mailbox "out" of Mail Folder "" to
"<destination address>"
set Field "Cc" of Message 1 of Mailbox "out" of Mail Folder "" to
"<carbon copy address>"
set Field "Bcc" of Message 1 of Mailbox "out" of Mail Folder "" to
"<blind carbon copy address>"
set Field "" of Message 1 of Mailbox "out" of Mail Folder "" to
"<Body of message>"
get Field "" of Message -2 of Mailbox "in" of Mail Folder ""
get Field "Subject" of Message -2 of Mailbox "in" of Mail Folder ""
end tell
(* Move every message in the "In" box that has a title that contains "Re:"
to a mailbox called "stupid" in the top level mail folder *)
tell application "Eudora"
copy (count Message of Mailbox "in" of Mail Folder "") to maxcount
copy maxcount to messNum
repeat with i from 1 to maxcount
if Field "Subject" of Message messNum of Mailbox "in" of
Mail Folder "" contains "Re:" then
move Message messNum of Mailbox "in" of Mail Folder
"" to end of Mailbox "stupid" of Mail Folder ""
end if
set messNum to messNum - 1
end repeat
end tell
--------------------------
-- This script is a "framework" for registering an application with Eudora
-- that will receive events from Eudora and process incoming mail.
on <<event CSOmeNot>> msgList
copy (count of items in msgList) to msgNum
repeat with i from 1 to msgNum
tell application "Eudora"
if field "Subject" of (item i of msgList as message)
contains "test" then
beep -- here's where you process the message
end if
end tell
end repeat
end <<event CSOmeNot>>
on quit
tell application "Eudora"
please notify alias "Hard_Disk:AppleScript:notify.script"
without Notify
end tell
continue quit
end quit
tell application "Eudora"
please notify alias "Hard_Disk:AppleScript:notify.script"
end tell
=========================================================================
Date: Thu, 14 Apr 1994 00:11:22 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Manuel Veloso <veloso@NETCOM.COM>
Subject: Re: Class of parameter '****'
>There are a couple of ways to extract a parameter of unknown type from an
>Apple event. [rest omitted]
Huh. I figured that by the time applescript got through with the data,
there wouldn't be any way to work backwards to its original type, the AE
calls notwithstanding.
I'm suprised that the type information is still present with the data...I
thought that when the data's converted to the generic type for the osax,
type info would be lost along the way. It's nice to know that the AE system
is robust in this sense. Since I need to get certain types, I'll be going
the AEGetParamPtr route (as I do with the rest of the parameters).
Thanks,
Manuel
=========================================================================
Date: Thu, 14 Apr 1994 00:38:54 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Manuel Veloso <veloso@NETCOM.COM>
Subject: Class of data object from wildcard (summary)
Hmmm. I'm starting to get my head around the relationship between the AE
manager and applescript. Lets see....
Any given data parameter that is passed to a scripting addition is first
targeted down to a specific apple-event to the addition. Then, the data is
stuffed into an apple-event descriptor that fits the data format specified
in the scripting addition's aete. During this time, no coercion of the data
takes place (unless the 'as xxxxx' syntax is used); the data is passed
as-is, with the actual type of the data being a part of the above
descriptor.
Then, the descriptor gets built into an appleevent that gets passed onto
the scripting addition. Since the data structure (not contents) has been
validated by AppleScript, it's sort of guaranteed that the data is at least
in the correct structure, and that the minimum number of required
parameters are present.
It is actually the addition that performs/requests coercions, when it pulls
the info out of the appleevent...the data may be in any form before the
coercion takes place, with the assumption being the data is convertible. So
if testaddition takes a long as a parameter, but is passed a string like
"15542", the text string "15542" is passed with its type as typeText.
So basically, that means that most/all of applescript's structures (lists,
records, etc) mirror the ones in IM-IAC, and that OSA scripting
environments are basically data validation/front-ends/editors for the
apple-event manager.
How far/near is this description to reality? And, is there some document or
something that bridges between OSA and the AppleEvent manager?
>>> For the benefit of those that may be lurking or would feel
>
>Here's one:
>
>AEGetParamPtr(&theAppleEvent,
> theAEKeyword,
> desiredType, <-- the type you want (or typeWildCard)
> &typeCode, <-- the actual type before coercion
> dataPtr,
> maximumSize, <-- use 0 here to skip the data
> &actualSize);
>
>Here's another:
>
>AESizeOfParam(&theAEEvent,
> theAEKeyword,
> &typeCode, <-- the type of the parameter
> &dataSize);
>
>Jon
=========================================================================
Date: Thu, 14 Apr 1994 09:03:13 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Steven L. Rohall" <slrohall@TASC.COM>
Subject: Finder files v. Finder aliases?
Can anybody tell me why the following piece of code:
set fd to open for access {file destinationFile}
set theText to read fd from 1 to -1 as text
close access fd
display dialog theText
works when destinationFile is a real file (in this case, created by
TeachText), but does not work when it is an alias to the same real file
(such as created by "Make Alias" from the File menu or by "symlink" in
MacPerl). In the case when destinationFile is an alias, I get an "End of
file error". Note that I get the same behavior when the first line reads:
set fd to open for access {alias destinationFile}
I come from a Unix world, so I thought (perhaps incorrectly :-) ), that
Finder aliases were like Unix symbolic links.
BTW, some applications don't seem to mind these aliases:
tell application "Simple Player" to open {alias destinationFile}
works fine, but
tell application "Sound Machine" to open {alias destinationFile}
doesn't. In the first case, SimplePlayer opens up the movie file as you
would expect. In the second case, SoundMachine shows in its control panel
that the file has been opened, but will not play it automatically even if
"play on open" is specified. It will play it if you mouse on the control
panel. Again, if destinationFile is a real file, everything works. If it
is a Finder alias, it doesn't. Any clues?
Thanks,
-Steve.
+--------------------------------------------------------------+
| Steven L. Rohall |
| ________ _ ______ ______ |
| 55 Walkers Brook Drive / / \ / / / / |
| Reading, MA 01867-3297 / /___\ /______ / |
| Tel: (617)942-2000 / / \ // |
| Fax: (617)942-7100 / / \/______//______/ |
| slrohall@tasc.com |
| (MIME-conformant mail welcome.) |
+--------------------------------------------------------------+
=========================================================================
Date: Thu, 14 Apr 1994 10:01:44 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: MoveFilestoTrash
Is anyone having problems with this osax? When I use it to try and move a
folder on a network-mounted volume to the trash, I get a dialog stating
that the folder already exists there and do I want to replace the existing
one. This happens even when the trash on both machines is empty. Any
ideas? I need to postpone actually deleting the folder, so deletefiles()
isn't an option.
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Thu, 14 Apr 1994 10:05:27 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: MoveFilestoTrash, cont...
>Is anyone having problems with this osax? When I use it to try and move a
>folder on a network-mounted volume to the trash, I get a dialog stating that
>the folder already exists there and do I want to replace the existing one.
Sorry, I misspoke. Actually, what the dialog says is that the folder
already exists: OK, cancel. If I choose cancel, nothing happens to the
folder, and if I choose OK, the folder gets deleted (no fat trash can, no
nothing). Very frustrating.
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Thu, 14 Apr 1994 10:09:09 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: MoveFilestoTrash, cont 2...
>Is anyone having problems with this osax?
And, come to think of it, it's not an osax, it's part of the FinderLib
script. Man, I hate tax time....
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Thu, 14 Apr 1994 10:15:41 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Myers <dcmyers@ACCESS.DIGEX.NET>
Subject: Frontier price increased to $495???
The newest MacWeek has a comparison between UserLand Frontier and
AppleScript. The review was balanced overall in my opinion, but one
item really caught me by surprise. Apparently, UserLand has increased
the price to $495! I'm glad I've already bought it, because I never
would have paid that much for it. Putting aside questions of whether
it is "worth it" or not, I simply could not have afforded it.
Does anybody else agree with me that this will kill the market for the
product? I have assumed all along that UserLand was targeting the
hobbyist/tinkerer rather than the corporate developer...
____________________________________________________
David C. Myers
dcmyers@access.digex.net
=========================================================================
Date: Thu, 14 Apr 1994 10:32:01 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: OSA Menu
I have a script that does an operation on the finder selection, and it runs
find from the script editor, but it would be a lot more useful if i could run
it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
it gives me an error of -1762. What does this mean, and how can i fix it?
also, what is the email address of Leonard Rosenthal, the author of OSA Menu?
(so that i can ask him this question also)
tia!!
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Thu, 14 Apr 1994 10:31:30 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Luis Muench <muench@SOLIX.FIU.EDU>
Subject: Re: Frontier price increased to $495???
In-Reply-To: <9404141418.AA25407@fiu.edu>
Whoa, dude! $495.00. Sheesh! I think its time someone (who can) should
create a "Bare-Bones" scripting environment for us po'folk on the net. I
WOULD pay my shareware! I swear! Hmm... Maybe AppleScript is my answer!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<<<<<<Reality is anything that cannot be undone or avoided
>>>>>>Luis Muench -- muench@solix.fiu.edu
On Thu, 14 Apr 1994, David Myers wrote:
> The newest MacWeek has a comparison between UserLand Frontier and
> AppleScript. The review was balanced overall in my opinion, but one
> item really caught me by surprise. Apparently, UserLand has increased
> the price to $495! I'm glad I've already bought it, because I never
> would have paid that much for it. Putting aside questions of whether
> it is "worth it" or not, I simply could not have afforded it.
>
> Does anybody else agree with me that this will kill the market for the
> product? I have assumed all along that UserLand was targeting the
> hobbyist/tinkerer rather than the corporate developer...
>
>
> ____________________________________________________
>
> David C. Myers
> dcmyers@access.digex.net
=========================================================================
Date: Thu, 14 Apr 1994 10:50:17 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Brown <dlb1@SEQUOIA.LLE.ROCHESTER.EDU>
Subject: Re: Example Eudora Scripts
Thanks for all the help everyone. I've downloaded the list archives to use
with EasyView (lots of useful stuff) and your specific examples are very
helpful. The one script fragment that does not work for me is the
following:
>on <<event CSOmeNot>> msgList
> copy (count of items in msgList) to msgNum
> repeat with i from 1 to msgNum
> tell application "Eudora"
> if field "Subject" of (item i of msgList as message)
>contains "test" then
> beep -- here's where you process the message
> end if
> end tell
> end repeat
>end <<event CSOmeNot>>
I have been able to register with Eudora (1.4.2) and I get the New Mail
notification, but the parameter msgList is always empty if I, say, try to
place it in Scriptable Text Editor. What's supposed to be in there? Are
these supposed to be only the new messages (that's exactly what I need)? I
should be able to work around it by directly asking Eudora for the info,
but has anyone else got this to work?
--Dave
David L. Brown <dlb1@lle.rochester.edu>
Laboratory for Laser Energetics
250 East River Road
Rochester, NY 14623 USA UR \|/
-----------------------------------------------------------------------*--
(716) 275-6880 LLE /|\
=========================================================================
Date: Thu, 14 Apr 1994 11:00:41 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
Subject: Re: Menu Events, Menu Grabber,
>Menu Grabber is way kewl. But iwas just able to restart my
>colleagues mac, without he coming to know about. Aren't we
>talkin a major security hole here? I know I know, u can turn
>off your filesharin/linkin...but thats not what i am lookin at...
(Just to clarify, Menu Events and Menu Grabber don't use Finder AE's
like 'FNDR'/'rest', but you can tell them to select a menu item in
Finder called "Restart".)
which when you choose will restart the Mac. I think the endresult is
a bit too interesting than the actual process that is involved. clear!
If you have Menu Events installed, here's how to protect yourself
against Marilyn and her kind:
Yup, always use protection, it helps in any case. Gawd, if only they
practised it in the sixties...
1. Turn off Program Linking in Sharing Setup, so that Menu Events
and Menu Grabber will only work locally; or
2. Deny guests the privilege of linking to programs on your Mac; or
In other words, go back to '60s, make your Mac an ugly standalone,
rip all its kewl sharin features, don't let anyone touch your mac,
not even to play Bolo or SuperMaze wars..
3. Use a particular application's Sharing dialog to turn off remote
program linking (does this work on 7.1.2's Finder?); or
What was thaat again.....
4. Lock the Menu Events extension file (startup icon will reflect
change), so that only applications running in kAEInteractWithAll
mode will accept a Select Menu Item event from a remote sender.
I doubt there are many non-scriptable applications which choose
run in this mode, or which let you select this mode through GUI.
kAEInteractWithLocal is the default, and Menu Events cleverly
overrides that setting if you don't lock it - hence the hole!
Hmmm.. I have to try this, and see what happens. Its interestin to
see how it overrides that setting of any appl, even if the appl is
locked, when the menu events extnsn ain't locked.
But as i said before, menu events is still kewl, it is just its
spokesman who ain't. :-)))))
__ __
Marilyn Monroe
Bring Back the Goddess Inc.
Don't tell me later that folks in Temple think the same way
folks in Heaven do.
=========================================================================
Date: Thu, 14 Apr 1994 08:20:06 LCL
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tim Keanini <Tim_Keanini@BRODER.COM>
Subject: Re: Frontier price == $495???
>The newest MacWeek has a comparison between UserLand Frontier and
>AppleScript. The review was balanced overall in my opinion, but one
>item really caught me by surprise. Apparently, UserLand has increased
>the price to $495! I'm glad I've already bought it, because I never
>would have paid that much for it. Putting aside questions of whether
>it is "worth it" or not, I simply could not have afforded it.
I am happy that I bought it early too.:-)
>Does anybody else agree with me that this will kill the market for the
>product? I have assumed all along that UserLand was targeting the
>hobbyist/tinkerer rather than the corporate developer...
I have gotten 90% of all my work this past 2 years done in Frontier.
I still don't think that Applescript ships with enough stuff to call itself a
development system (no good debugger yet). Don't get me wrong, I am not trying
to start a flame war here, I just think that Frontier, given its evolution, is
higher on the food chain when it comes to really getting a script written,
debugged, and working.
If you look at the Frontier side, they did not charge for the 1.0 to 2.0 and
they now charge a little for the 2.0 to 3.0, it may add up to a discounted
495.00 list maybe? Does anyone know what the discounted price for Frontier is
now?
If you take a look at AppleScript, I bought it at 1.0, then paid to upgrade to
1.1, and I still need to buy a good debugger. I would like to make a humble
and
simple comparison here:
When Apple released Quicktime, they shipped it with the Simple Player, they did
not ship it with Adobe's Premiere. Needless to say that until Premiere came
out, you really could not do any development on it.
Given that, when Apple released AppleScript, they shipped it with the
ScriptEditor, they did not ship it with _development_system. (I live in my
debugger).
So, now I need to buy one, but, there are none out yet on the market, and when
the one that I want comes out, it will cost me $249.00 (Main Event Scriptor
1.0).
OK, so here is what Apple script is going to cost me for the same type of
development tools that I have on Frontier 3.0.
Apple 1.0 $199.00
upgrade to 1.1 $ 99.00
Scriptor 1.0 $249.00
Not to mention the fact that development on a 1.0 version make me nervous if I
have a deadline.
Again, I am not complaining about anything, I really love both of them, I just
wish that the AppleScript side of this would catch up quicker.
--Tim Keanini blast@crl.com
ps I personally would still buy Frontier at that price, it would just have
taken
me longer to save up.:-)
=========================================================================
Date: Thu, 14 Apr 1994 11:39:29 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: OSA Menu
In-Reply-To: <no.id> from "Matthew Ahrens" at Apr 14, 94 10:32:01 am
--Matthew Ahrens wrote:
>
>I have a script that does an operation on the finder selection, and it runs
>find from the script editor, but it would be a lot more useful if i could run
>it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
>it gives me an error of -1762. What does this mean, and how can i fix it?
Sounds like you might need to increase your Finder memory. If you
have ResEdit you should make a copy of your Finder, open it up; open up
the SIZE resource and double-click on the -1. Scroll to bottom and
increase the highlighed number. The normal setting is 155k. I have mine
set to 1MB, but 512k is probably good enough.
-Hades
=========================================================================
Date: Thu, 14 Apr 1994 11:21:25 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Erik C. Thauvin" <ravensys@ESKIMO.COM>
Subject: Re: Frontier price increased to $495???
In-Reply-To: <199404141417.AA23677@eskimo.com>
On Thu, 14 Apr 1994, David Myers wrote:
> The newest MacWeek has a comparison between UserLand Frontier and
> AppleScript. The review was balanced overall in my opinion, but one
> item really caught me by surprise. Apparently, UserLand has increased
> the price to $495! I'm glad I've already bought it, because I never
> would have paid that much for it. Putting aside questions of whether
> it is "worth it" or not, I simply could not have afforded it.
>
> Does anybody else agree with me that this will kill the market for the
> product? I have assumed all along that UserLand was targeting the
> hobbyist/tinkerer rather than the corporate developer...
>
> David C. Myers
>
$495 is pretty steep. UserLand doesn't have a huge market share at this
point, I don't see how the price increase will make it any better for them.
A $495 sticker price places Frontier into the Symantec C++ price range;
although completely different products, SC++ seems like a much better deal
to me.
E.
--
Erik C. Thauvin | Custom Software Solutions | Raven Systems Limited
ravensys@eskimo.com | For Everyday Problems. | P. O. Box 560894
+1 (206) 747-9819 | | Orlando, FL 32856, USA
URL= file://eskimo.com/ravensys/www/raven.html
=========================================================================
Date: Thu, 14 Apr 1994 11:22:22 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chuck Pliske <chuckp@U.WASHINGTON.EDU>
Subject: Re: Restarting Remote mac
>Is there any way to restart a remote mac (assuming you have all the proper
>access privs) without having to deal with extensions that need a restart in
>the first place?
Depending on *why* you want to restart, I wrote some time ago a trivial
little app which used time manager calls to detect when the "mainline"
crashed, by counting from an interrupt and resetting the count from the
mainline. After a compilable amount of time with no reset, it restarts the
machine. It's a faceless bg app, about 4k, and has saved my butt many times.
Anyone wants it, just ask. There is also a more "professional" shareware
program on sumex designed for the same purpose.
Chuck
=========================================================================
Date: Thu, 14 Apr 1994 12:47:15 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Sean Elfstrom <selfstro@NEPTUNE.CS.TRINITY.EDU>
Subject: Re: OSA Menu
In-Reply-To: <9404141558.AA04656@neptune.cs.trinity.edu> from "Matthew Ahrens"
at Apr 14, 94 10:32:01 am
>
> I have a script that does an operation on the finder selection, and it runs
> find from the script editor, but it would be a lot more useful if i could run
> it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
> it gives me an error of -1762. What does this mean, and how can i fix it?
>
> also, what is the email address of Leonard Rosenthal, the author of OSA Menu?
> (so that i can ask him this question also)
>
> tia!!
>
> --
> My opinions are mine only and tentative, pending further data
> Matthew Ahrens
> ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
> MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
>
The advice given to me, when I had the same problem, was to increase the
amount of memory allocated to the Finder. The instructions on how to do
this, as given to me by John Baxter are as follows:
>If you only have one startup volume prepared, make a copy of Finder by
>dragging its icon to another folder while holding down the option key.
>Using ResEdit or one of the others, modify the SIZE -1 resource. Add
>100,000 or so to the second size box in that resource (shown in decimal
>bytes by ResEdit, other editors may differ). Quit ResEdit or whatever.
>Drag the Finder out of the System Folder (to Trash is OK). Drag your
>modified Finder into the System folder. Restart.
>
>If you have two startup volumes available, restart from the other one,
>change the Finder on your regular one, and restart from your regular
>startup volume.
When I did that, (and upgraded to AS 1.1) everything worked!
Leonard's address is leonardr@NETCOM.COM.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| Sean Elfstrom | Trinity University |
| selfstro@tusol.cs.trinity.edu | 715 Stadium Dr. #707 |
| NeXTMail: selfstro@oberon.cs.trinity.edu | San Antonio, TX 78212-7200 |
| **PGP 2.3 Signature available via finger** | (210)737-4728 McLean 124 |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=========================================================================
Date: Thu, 14 Apr 1994 14:39:33 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Luis Muench <muench@SOLIX.FIU.EDU>
Subject: Are scripts available?
I just downloaded Leonard Rosenthal's OSA Menu 1.0, which places a
script-playing menu next to the help menu. Through this menu, and its
associated folders in the system folder you can launch scripts for the app
you are currently in. The associated folders in the system folder work
like the apple menu items folder. You put the finder scripts in the
finder folder and they will become immediately available under the
Script-playin menu.
The author mentions that the scripts must be 'compiled', not text
files.
Since I have no way of generating these compiled scripts, I was
wondering if anyone would know where there may be compiled scripts one
could download and use. I would be particularly interested in any kind of
finder scripts.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<<<<<<Reality is anything that cannot be undone or avoided
>>>>>>Luis Muench -- muench@solix.fiu.edu
=========================================================================
Date: Thu, 14 Apr 1994 16:12:28 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Translating via Stuffit
okok, i know that this was a topic of discussion awhile ago, so just reply
to me, don't bother sending it to the list.
how do i get Stuffit to translate a file using the translate menu via
applescript? a nice, simple answer would be nice. i tried
translate match name "BinHex4" command "encode \"" & <filepath> & "\""
but it didn't work. (filepath is a string, not an alias)
btw, i have stuffit version 3.0.5, is that the most rescent?
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Thu, 14 Apr 1994 15:12:28 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Robert Walker <rwalker@LOCHNESS.UHC.COM>
SIGNOFF Robert Walker
--
__ __
Robert Walker | | _()_ | | E-Mail: rwalker@uhc.com
United HealthCare Corp | | \ / | | AT&T: (612) 945-6533
| \__\/__/ | Fax: (612) 945-6502
\__________/
=========================================================================
Date: Thu, 14 Apr 1994 15:31:12 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Translating via Stuffit
In-Reply-To: Your message of "Thu, 14 Apr 94 16:12:28 EDT"
>okok, i know that this was a topic of discussion awhile ago, so just reply
>to me, don't bother sending it to the list.
>
>how do i get Stuffit to translate a file using the translate menu via
>applescript? a nice, simple answer would be nice. i tried
>translate match name "BinHex4" command "encode \"" & <filepath> & "\""
>but it didn't work. (filepath is a string, not an alias)
>
This reminds me. I don't think I've mentioned it, but I've been archiving the
monthly digests on gaea. You'll find them in
ftp://gaea.kgs.ukans.edu/applescript/docs/digestsfeb94
ftp://gaea.kgs.ukans.edu/applescript/docs/digests/mar94
BBEdit can find stuff in them in no time at all. :-)
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Thu, 14 Apr 1994 17:12:27 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Translating via Stuffit
In-Reply-To: <no.id> from "Fred Terry" at Apr 14, 94 03:31:12 pm
--Fred Terry wrote:
>
>This reminds me. I don't think I've mentioned it, but I've been archiving the
>monthly digests on gaea. You'll find them in
This is kind of cool. Thanks Fred. ;->
>ftp://gaea.kgs.ukans.edu/applescript/docs/digestsfeb94
>ftp://gaea.kgs.ukans.edu/applescript/docs/digests/mar94
>
>BBEdit can find stuff in them in no time at all. :-)
You can also get a really nice interface to the digest files using
EasyView. It does, however, require a small modification. You need to
hold down the option key and select Preferences... When the dialog box
open up change the Mail Start field from "From" to "Date:" (without the
quotes). This formats the digest file quite nicely. And you can also set
the format of the chapters. I usually set mine to Sender*Subject for
digests.
-Hades
=========================================================================
Date: Thu, 14 Apr 1994 14:50:20 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Benjamin Broder <bbroder@HSC.USC.EDU>
Subject: Applescript Scripter's Kit vs. AS Software Developer's Kit
Sorry if this comes through twice, I sent it to the wrong address the
first time.
What are the differences (in cost and contents) between the
AS Scripter's Kit and the AS Software Developer's Kit?
Ben
--
bbroder@hsc.usc.edu Benjamin Broder FAX (818) 457-4100
USC Institute for Health Promotion and Disease Prevention Research
1000 S. Fremont Ave. #641, Alhambra, CA 91803-1358 (818) 457-4029
=========================================================================
Date: Thu, 14 Apr 1994 16:05:40 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Dennis J. Wilkinson, II" <djw@CRA.COM>
Subject: Re: Example Eudora Scripts
>I have been able to register with Eudora (1.4.2) and I get the New Mail
>notification, but the parameter msgList is always empty if I, say, try to
>place it in Scriptable Text Editor. What's supposed to be in there? Are
>these supposed to be only the new messages (that's exactly what I need)? I
>should be able to work around it by directly asking Eudora for the info,
>but has anyone else got this to work?
Apparently there's a flaw somewhere between Eudora and AppleScript -- seems
like the only thing you can actually do with msgList is find out how many
items are in it (get the number of items of msgList).
If you otherwise try to work with it, your scripts will either:
a) Generate an error -or-
b) Just stop (no error, no hang, just stop doing what they're doing.)
Yes, try-on error-end try sets do seem to behave, from what I can tell.
-- Dennis
----------------------------------------------------------------------------
Dennis J. Wilkinson, II : Usual disclaimers apply. If I put
djw@cra.com : my foot in my mouth, it's my
Software Engineer : fault, and has nothing at all to
Charles River Analytics, Cambridge MA : do with Charles River Analytics
=========================================================================
Date: Fri, 15 Apr 1994 10:20:22 +1200
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tim Bates <timothy@BIO.AUCKLAND.AC.NZ>
Organization: University of Auckland, New Zealand
Subject: admin- help needed in signi
Reply to: admin: help needed in signing off
Hi,
I have tried signing off under all the accounts I know of, however
I remain connected and persona non grata. I initially subscribed to
frontier if that helps.
Could you please disconnect someone called <timothy bates>. It
is probably me ;-)
thanks very much
tim bates
=========================================================================
Date: Thu, 14 Apr 1994 21:14:06 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: INRA000 <INRA@MUSICB.MCGILL.CA>
Subject: Need beta testers for File Tracker.
Greetings Netters,
I'm finishing a long-running project of mine and am looking for a (few)
beta testers to put my final product through the grinder before it gets
released. I'm posting my request to the MacScripting list because this
product has quite a bit to do with AppleScript or any other OSA-compliant
scripting language. The program's final name will be File Tracker.
This program is what would now be called an "improved Folder Watcher"
although development was started long before that program was released. In
a nutshell, File Tracker can "watch" files or folders on your hard drive
or someone else's over a network, and take action when changes are detected.
The clincher is that File Tracker builds an internal image of watched folders
which it uses to detect exactly *what* occured when a change is detected. In
this way, you can set File Tracker up to take a specific action, say opening
the involved items, when files *arrive* in a folder, but a completely different
action if files are *modified* within the folder. In all cases, File Tracker
can pinpoint the files or subfolders involved.
File Tracker detects just about any conceivable occurance involving files
or folders, including the ability to scan for files not modified for a certain
length of time. File Tracker works best with AppleScript, but includes a
built-in set of actions that include the ability to mount and unmount network
volumes automatically, move, open, alias or copy files, and file detailed
reports. File Tracker can intelligently backlog files if they are busy or if
some other condition prevents them from being processed immediately. For
example, File Tracker will wait for a download to be complete before attempting
to decompress an item, or will wait for enough memory to be available before
opening an item with an application that is not running.
File Tracker will be shareware $15US. The distributable program is fully
functional -- no crippleware or annoying messages. (Although there's an
Easter Egg for registered users). :-)
I'm looking for people with an interesting application for File Tracker
to give it a test run in the real world to shake loose any problems I may
have overlooked in my own testing. Ideally, testers should be interested in
using both the built-in set of actions as well as AppleScript for processing,
since that will give the program the most thorough work-out.
If you're interested in beta-testing File Tracker, drop me a line. I
can't offer you anything more than a free registered copy of the final product,
immortality in the form of your name in the about box, and my thanks, but
hey -- you will have helped polish a shareware product. :-) I'm planning to
start the beta test period on Monday -- people chosen as beta sites will
receive the full distribution package then. I would like it if people wishing
to beta-test File Tracker had a debugger (ex: MacsBug) installed on their
machine, since it makes bug reports so much easier.
Everyone else, hang in there. File Tracker has been a long time in
development, and I'm pretty confident that I've nailed everything in my own
evaluations. With any luck, the beta period shouldn't be very long.
Cheers,
Mark Aiken
inra@musicb.mcgill.ca
=========================================================================
Date: Fri, 15 Apr 1994 00:25:42 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
Subject: Re: Frontier price increased to $495???
At 10:31 AM 4/14/94 -0400, Luis Muench wrote:
>Whoa, dude! $495.00. Sheesh! I think its time someone (who can) should
>create a "Bare-Bones" scripting environment for us po'folk on the net. I
>WOULD pay my shareware! I swear! Hmm... Maybe AppleScript is my answer!
I think Tickle is has a Scripting component as part of it, and is able to
use the various osaxen and the like. However, I think you need to have
AppleScript to get the other parts (like Apple Event Manager, and the OSA
stuff)
I pulled tickle off gaea, and plan to get to playing with it eventually.
It seems to be quite useful to people I know who use it under UNIX.
Bob
--
Bob Snyder N2KGO MIME, RIPEM mail accepted
snyderra@dunx1.ocs.drexel.edu finger for RIPEM public key
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
=========================================================================
Date: Fri, 15 Apr 1994 00:01:20 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: 5 Answers
ITEM 1:
>Any given data parameter that is passed to a scripting addition is first
>targeted down to a specific apple-event to the addition. Then, the data is
>stuffed into an apple-event descriptor that fits the data format specified
>in the scripting addition's aete. During this time, no coercion of the data
>takes place (unless the 'as xxxxx' syntax is used); the data is passed
>as-is, with the actual type of the data being a part of the above
>descriptor.
This is not entirely correct. The data type in the aete is purely there
for the user. AppleScript doesn't use it for anything. All it uses are
the parameters and it doesn't even make sure that you supply all the
required ones. Your event handler has to do that. Thus, you are correct
in stating that the data is passed as-is.
>It is actually the addition that performs/requests coercions, when it pulls
>the info out of the appleevent...the data may be in any form before the
>coercion takes place, with the assumption being the data is convertible. So
>if testaddition takes a long as a parameter, but is passed a string like
>"15542", the text string "15542" is passed with its type as typeText.
This is entirely correct and very important in AppleScript/AE.
ITEM 2:
>Can anybody tell me why the following piece of code:
>
>set fd to open for access {file destinationFile}
>set theText to read fd from 1 to -1 as text
>close access fd
>display dialog theText
>
>works when destinationFile is a real file (in this case, created by
>TeachText), but does not work when it is an alias to the same real file
>(such as created by "Make Alias" from the File menu or by "symlink" in
>MacPerl). In the case when destinationFile is an alias, I get an "End of
>file error". Note that I get the same behavior when the first line reads:
>
>set fd to open for access {alias destinationFile}
>
>I come from a Unix world, so I thought (perhaps incorrectly :-) ), that
>Finder aliases were like Unix symbolic links.
Not quite. There is still application support required for dealing with
aliases, but the system manages to hide it from most apps. Notably, when
dropping a file on another, the alias is resolved first. Also, when an
alias is chosen in the standard file dialogs, the alias is resolved (try
option clicking on an alias in the standard file dialog).
The File Commands osax forgot to resolve aliases. I'll report it as a bug.
ITEM 3:
>>Is anyone having problems with this osax? When I use it to try and move a
>>folder on a network-mounted volume to the trash, I get a dialog stating that
>>the folder already exists there and do I want to replace the existing one.
Yeah, there's something broken in that script. I forget what, but it
relates to the fact that network volumes don't always have trash folders.
If they are write protected a certain way then you can't put things in the
trash. If you try it from the Finder you'll probably get a message saying
something like "File can't be put in the trash, delete it immediately?"
If you can't afford to delete it immediately, then make a copy somewhere
you _can_ write to, like the boot volume's trash, and then delete the file.
ITEM 4:
> Sounds like you might need to increase your Finder memory. If you
>have ResEdit you should make a copy of your Finder, open it up; open up
>the SIZE resource and double-click on the -1. Scroll to bottom and
>increase the highlighed number. The normal setting is 155k. I have mine
>set to 1MB, but 512k is probably good enough.
Actually, about 300K is plenty. You can probably get away with less too.
The best thing is to bug Leonard (leonardr@netcom.com) to finish version
1.0.1 of OSA Menu which fixes these memory problems. ;)
ITEM 5:
> Since I have no way of generating these compiled scripts, I was
>wondering if anyone would know where there may be compiled scripts one
>could download and use. I would be particularly interested in any kind of
>finder scripts.
Compiled scripts won't help. You need AppleScript. OSA Menu isn't enough.
If you have AppleScript then you have the Script Editor and you _can_
compile scripts. Of course, learning how is why this list was created. ;)
Sorry about rolling all of this into one response, but hey, tough. ;)
Jon
=========================================================================
Date: Fri, 15 Apr 1994 10:20:28 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Johan Solve <johan.solve@ITN.HH.SE>
Subject: AppleScript speed (or slowness)
I'm generally disappointed with the speed of AppleScript when it comes to
cooperation with different applications.
For example, I have one script that calculates the median value (the middle
value in a series) in a FileMaker database. After the database is sorted,
it takes up to 15 seconds before I get the respons. The script itself can't
be so slow, it has to be the AppleEvent traffic that is the bottleneck.
I have another script that sorts my Eudora mail into different mailboxes.
It works very well, but is SOOOOO slow. It takes up to 10 seconds to sort
one single message. I don't think that the script itself is slow, there is
nothing strange with it, besides perhaps the try statement.
My guess is that the bottleneck is AppleEvents, or possibly AppleScript
itself (I still use 1.0, waiting for the Goodman update...).
I'm running a IIvx with 7.1.
What are your opinions or suggestions when it comes to AppleScript speed
when cooperating with applications? Is it a general rule to bring
AppleEvent calls to a minimum? For example, the sort mail script could
perhaps fetch the entire header in one AE call (don't know if Eudora
supports this), and process the information further within AppleScript. Am
I correct?
Here are the scripts, if anyone suspects them for poor performance.
Comments are welcome.
Wrapped lines end with --
Script for median value in FileMaker :
---------
tell application "FileMaker Pro"
activate
Sort by Field "month salary" of Layout "form" of Database "Salaries"
set n to Record Count
end tell
set median to midvalue(1, n)
set undkvart to midvalue(1, (round (n / 2) rounding up))
set uppkvart to midvalue(((round (n / 2) rounding down) + 1), n)
tell application "FileMaker Pro"
display dialog "Median: " & median & " kr" & return & return --
& "Lower quarter: " & undkvart & " kr" & return --
& "Upper quarter: " & uppkvart & " kr" buttons {"OK"} default --
button "OK"
end tell
on midvalue(firstrecord, lastrecord)
set n to lastrecord - (firstrecord - 1)
set m to firstrecord - 1 + (round n / 2 rounding down)
tell application "FileMaker Pro"
set a to Get Data of Cell "month salary" of Record m of --
Layout "form" of Database "Salaries"
set b to Get Data of Cell "month salary" of Record (m + 1) of --
Layout "form" of Database "Salaries"
if n / 2 = (round n / 2) then
set median to round (a + b) / 2
else
set median to round (b + 0)
end if
end tell
return median
end midvalue
---------
Eudora sort mail script:
---------
tell application "Eudora1.4.2"
--activate -- disabled, faster if script is in foreground ?
set n to number of message of mailbox "In" of mail folder ""
set i to 1 -- use separate counter since the pointer should only
-- increase if we don't move a message
repeat with j from 1 to n
try
set itsTo to field "To" of message i of mailbox "In" of --
mail folder ""
on error
set itsTo to ""
end try
try
set itsCC to field "cc" of message i of mailbox "In" of --
mail folder ""
on error
set itsCC to ""
end try
try
set itssender to field "sender" of message i of mailbox --
"In" of mail folder ""
on error
set itssender to ""
end try
set itsTo to itsTo & return & itsCC & return & itssender
if itsTo contains "applescript%" or itsTo contains --
"MACSCRPT%" then
move message i of mailbox "In" of mail folder "" --
inserthere end of mailbox "AppleScript" of mail folder ""
else if itsTo contains "YACHT-L%" then
move message i of mailbox "In" of mail folder "" --
inserthere end of mailbox "yacht and sail" of mail folder ""
else if itsTo contains "FMPRO-L%" then
move message i of mailbox "In" of mail folder "" --
inserthere end of mailbox "FileMaker Pro" of mail folder ""
else if itsTo contains "info-mac digest" then
move message i of mailbox "In" of mail folder "" --
inserthere end of mailbox "info-mac digest" of mail folder ""
else
set i to i + 1 -- no message moved, increase pointer
if i > number of message of mailbox "In" of mail folder --
"" then exit repeat -- moved all messages already
end if
end repeat
end tell
play sound "doorbell"
---------
_______________________________________________________________________
"
JOHAN SOLVE Department of Science and Technology
<johan.solve@itn.hh.se> Halmstad University, Sweden
=========================================================================
Date: Fri, 15 Apr 1994 03:57:15 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Christopher Allen <consensus@NETCOM.COM>
Organization: Consensus Development Corporation, San Francisco, CA USA
Subject: Re: AppleScript speed (or slowness)
At 10:20 AM 4/15/94 +0100, Johan Solve wrote:
>I have another script that sorts my Eudora mail into different mailboxes.
>It works very well, but is SOOOOO slow. It takes up to 10 seconds to sort
>one single message. I don't think that the script itself is slow, there is
>nothing strange with it, besides perhaps the try statement.
I use Eudora 2.0.2, which has filtering built in for the function you are
trying to script. I find it FANTASTIC, as I deal with 300+ mail messages a
day.
I am looking to do more scripting with Eudora, but personally not put a
whole lot of effort into writing a script to do filtering unless you needed
something the standard filters did not.
One thing that I've got on a sideburner for Eudora scripting is an email
exploder/digest maker, but I suspect that I'll have to wait for a future
version of Eudora with a few more features to get it working.
------------------------------------------------------------------------
..Christopher Allen Consensus Development Corporation..
..<consensus@netcom.com> 4104-24th Street #419..
.. San Francisco, CA 94114-3615..
.. o415/647-6383 f415/647-6384..
..Mosaic/World-Wide-Web Front Door: ..
..ftp://netcom7.netcom.com/pub/consensus/www/ConsensusFrontDoor.html ..
=========================================================================
Date: Fri, 15 Apr 1994 08:05:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
Subject: Re: Need beta testers for File Tracker.
>Greetings Netters,
>
> I'm finishing a long-running project of mine and am looking for a (few)
>beta testers to put my final product through the grinder before it gets
>released. I'm posting my request to the MacScripting list because this
>product has quite a bit to do with AppleScript or any other OSA-compliant
>scripting language. The program's final name will be File Tracker.
>
We run an info system for K-12 education here in Georgia. Hundreds of
files are being added, deleted or modified each day by our staff and the
10K+ members of the system. File Tracker looks like something that we
could very well "grind" rather vigorously.
Please count us in on your beta test.
=========================================================================
Date: Fri, 15 Apr 1994 06:55:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: Frontier price == $495???
> Given that, when Apple released AppleScript, they shipped it with the
> ScriptEditor, they did not ship it with _development_system. (I live in my
> debugger).
> So, now I need to buy one, but, there are none out yet on the market, and
when
> the one that I want comes out, it will cost me $249.00 (Main Event Scriptor
> 1.0).
>
> OK, so here is what Apple script is going to cost me for the same type of
> development tools that I have on Frontier 3.0.
> Apple 1.0 $199.00
> upgrade to 1.1 $ 99.00
> Scriptor 1.0 $249.00
So... what would you consider a *better* AppleScript release?
What I'm readying (Beta in May) is a product which contains a AppleScript
editing (find & replace, improved dictionary, etc) and debugging (single
step, break points, variable watching) environment, a copy of my Scheduler
utility and an expanded version of my Script Tools package. I'm also
considering bundling AppleScript 1.1 with the software.
All of these items together, makes (I feel) AppleScript a really functional
and appealing product.
-Mark
=========================================================================
Date: Fri, 15 Apr 1994 09:00:22 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: admin- help needed in signi
In-Reply-To: Your message of "Fri, 15 Apr 94 10:20:22 +1100"
>I have tried signing off under all the accounts I know of, however
>I remain connected and persona non grata. I initially subscribed to
>frontier if that helps.
>
>Could you please disconnect someone called <timothy bates>. It
>is probably me ;-)
I've sent the message. You should receive notification pretty soon. Let me
know if you are still getting messages.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Fri, 15 Apr 1994 07:05:59 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Robert Mark <rmark@ISDMNL.WR.USGS.GOV>
Subject: Re: AppleScript speed (or slowness)
>I'm generally disappointed with the speed of AppleScript when it comes to
>cooperation with different applications.
>
>For example, I have one script that calculates the median value (the middle
>value in a series) in a FileMaker database. After the database is sorted,
>it takes up to 15 seconds before I get the respons. The script itself can't
>be so slow, it has to be the AppleEvent traffic that is the bottleneck.
>
An Applescript initiated search for records in FileMaker Pro takes about 2
orders of magnitude longer than the same search initiated in FileMaker.
tell application "FileMaker Pro"
show records (where cell 1 = "string") --VERY SLOW!!
end tell
=========================================================================
Date: Fri, 15 Apr 1994 10:56:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: Menu Events, Menu Grabber,
[deleted preceding conversation about ways to selectively plug the
intentional security hole in the Menu Events extension]
> 3. Use a particular application's Sharing dialog to turn off remote
> program linking (does this work on 7.1.2's Finder?); or
>
>What was thaat again.....
>
> 4. Lock the Menu Events extension file (startup icon will reflect
> change), so that only applications running in kAEInteractWithAll
> mode will accept a Select Menu Item event from a remote sender.
> I doubt there are many non-scriptable applications which choose
> run in this mode, or which let you select this mode through GUI.
> kAEInteractWithLocal is the default, and Menu Events cleverly
> overrides that setting if you don't lock it - hence the hole!
>
>Hmmm.. I have to try this, and see what happens. Its interestin to
>see how it overrides that setting of any appl, even if the appl is
>locked, when the menu events extnsn ain't locked.
Each application has a bit in its 'SIZE' resource which allows or
disallows remote program linking. If it's off, the program isn't
visible through PPC Toolbox across the network, so no Menu events.
This is the way to "lock" an application against remote senders.
If the application is visible, and Menu Events isn't locked, then
the extension won't respect the default kAEInteractWithLocal user
interaction restriction.
>But as i said before, menu events is still kewl, it is just its
>spokesman who ain't. :-)))))
>
>__ __
>Marilyn Monroe
>Bring Back the Goddess Inc.
Fella, if you're so cool, you can do without the pseudonym.
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Fri, 15 Apr 1994 11:27:50 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Abrams <stevea@CS.UMD.EDU>
Subject: Re: Need beta testers for File Tracker.
Mark,
If you're still looking for beta testers, I'd like to give it a try. Part of
my
job is to oversee the administrative staff of the Computer Science department
here. I am particularly interested in FileTracker's ability to watch file
activities over the network to assist in troubleshooting (computer-illiterate
users can rarely accurately recount to me what they were doing prior to a crash
or freeze...this would add one more set of data points ... sometimes I wish
Macs
would dump core just once <grin>).
Steve Abrams, Systems Programmer E: stevea@cs.umd.edu,
Dept. of Computer Science abrams@vacation.venari.cs.cmu.edu,
University of Maryland at College Park abrams.s@applelink.apple.com
=========
"Being afraid of monolithic organizations, especially when they have computers,
is like being afraid of really big gorillas, especially when they are on fire"
-- Bruce Sterling
=========================================================================
Date: Fri, 15 Apr 1994 11:58:34 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AppleScript speed (or slowness)
In-Reply-To: <no.id> from "Johan Solve" at Apr 15, 94 10:20:28 am
--Johan Solve wrote:
>
>I'm generally disappointed with the speed of AppleScript when it comes to
>cooperation with different applications.
>
> [ Stuff deleted ]
>
>My guess is that the bottleneck is AppleEvents, or possibly AppleScript
>itself (I still use 1.0, waiting for the Goodman update...).
>I'm running a IIvx with 7.1.
Well, I think that when you upgrade to AppleScript 1.1 you will see
some improvement in speed, but for the most part you are correct in your
thinking.
>What are your opinions or suggestions when it comes to AppleScript speed
>when cooperating with applications? Is it a general rule to bring
>AppleEvent calls to a minimum? For example, the sort mail script could
>perhaps fetch the entire header in one AE call (don't know if Eudora
>supports this), and process the information further within AppleScript. Am
>I correct?
I don't know that much about scripting Eudora, but I do have a few
comments and ideas on your scripts...
>Script for median value in FileMaker :
>---------
>tell application "FileMaker Pro"
> activate
> Sort by Field "month salary" of Layout "form" of Database "Salaries"
> set n to Record Count
>end tell
If FileMaker Pro already has the Salaries database open and in
front, and the current layout is the "form" layout you can drop all
references to "of Layout ... of Database ..." AppleScript will work with
the current ones.
>tell application "FileMaker Pro"
> display dialog "Median: " & median & " kr" & return & return --
> & "Lower quarter: " & undkvart & " kr" & return --
> & "Upper quarter: " & uppkvart & " kr" buttons {"OK"} default --
> button "OK"
>end tell
Why have you wrapped this display dialog command in a tell
statement? You don't get or send any data from FM Pro in the display
dialog command. This could be part of your problem right here.
>Eudora sort mail script:
>---------
>tell application "Eudora1.4.2"
You could change this to: tell mail folder "" of application ... It
would make all of your future references a little shorter.
> --activate -- disabled, faster if script is in foreground ?
> set n to number of message of mailbox "In" of mail folder ""
> set i to 1 -- use separate counter since the pointer should only
> -- increase if we don't move a message
> repeat with j from 1 to n
Since you don't use j within the loop at all a slightly more
efficient loop call might be "repeat n times".
> try
> set itsTo to field "To" of message i of mailbox "In" of --
> mail folder ""
> on error
> set itsTo to ""
> end try
> try
> set itsCC to field "cc" of message i of mailbox "In" of --
> mail folder ""
> on error
> set itsCC to ""
> end try
> try
> set itssender to field "sender" of message i of mailbox --
> "In" of mail folder ""
> on error
> set itssender to ""
> end try
> set itsTo to itsTo & return & itsCC & return & itssender
How about changing this series of commands to something like this:
if exists message i of mailbox "In" of mail folder ""
tell message i of mailbox "In" of mail folder ""
set itsTo to field "To" & return & field "cc" & return --
& field "sender"
end tell
end if
I don't think you really need all of those try statements, but I
could be wrong. If I'm right then what I wrote makes that whole thing
just a little bit shorter. ;->
> if itsTo contains "applescript%" or itsTo contains --
> "MACSCRPT%" then
> move message i of mailbox "In" of mail folder "" --
> inserthere end of mailbox "AppleScript" of mail folder ""
> else if itsTo contains "YACHT-L%" then
> move message i of mailbox "In" of mail folder "" --
> inserthere end of mailbox "yacht and sail" of mail folder ""
> else if itsTo contains "FMPRO-L%" then
> move message i of mailbox "In" of mail folder "" --
> inserthere end of mailbox "FileMaker Pro" of mail folder ""
> else if itsTo contains "info-mac digest" then
> move message i of mailbox "In" of mail folder "" --
> inserthere end of mailbox "info-mac digest" of mail folder ""
> else
> set i to i + 1 -- no message moved, increase pointer
> if i > number of message of mailbox "In" of mail folder --
> "" then exit repeat -- moved all messages already
> end if
> end repeat
>end tell
>play sound "doorbell"
I don't really know of a better way to handle the actual filtering.
Of course, I would kill for a good "case of" statement in AppleScript.
They have one in UserLand Frontier.
-Hades
=========================================================================
Date: Fri, 15 Apr 1994 13:13:28 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: What's with quiting?
Is there something non-obvious thing about how you are supposed to tell an
application to quit? Every time I try to do something like:
tell application "Scriptable Text Editor"
quit
end tell
I get an error reading:, "some parameter wasn't understood", highlighting
the quit command. What's wrong with this?
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Fri, 15 Apr 1994 13:24:20 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Putting stuff on the clipboard?
Simple question, is there any way to place text (or whatever) into the
clipboard?
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Fri, 15 Apr 1994 12:44:29 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Putting stuff on the clipboard?
In-Reply-To: Your message of "Fri, 15 Apr 94 13:24:20 EDT"
>Simple question, is there any way to place text (or whatever) into the
>clipboard?
Jon's commands?
=========================================================================
Date: Fri, 15 Apr 1994 13:08:09 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chuck Shotton <cshotton@OAC.HSC.UTH.TMC.EDU>
Subject: AppleScript shared lib on PPC
I've just run into an interesting programming problem regarding AppleScript
on PPC and need some advice. MacHTTP has the optional ability to execute
AppleScripts, but doesn't require that AppleScript be installed to run.
However, if the AppleScript shared library isn't present on a Power Mac,
the following message spews out:
"The Application 'MacHTTP 1.2.4' could not be run because 'AppleScriptLib'
could not be found"
First, is there an alternate source for the AppleScriptLib, other than the
AppleScript distribution itself? And, does anyone know Apple's policy
regarding the distribution of this library?
Second, is there some overlooked programming technique that I should use on
the PPC to indicate that a particular shared libary isn't mandatory and the
program should be allowed to run if it isn't present?
Thanks,
Chuck
p.s. Please CC: me on any responses.
--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_\_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton \
Assistant Director, Academic Computing \ "Shut up and eat your
U. of Texas Health Science Center Houston \ vegetables!!!"
cshotton@oac.hsc.uth.tmc.edu (713) 794-5650 \
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\-_-_-_-_-_-_-_-_-_-_-_-_-
=========================================================================
Date: Fri, 15 Apr 1994 14:27:41 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
Subject: Re: Menu Events, Menu Grabber,
[ Techy stuff well taken, hence not reproduced ]
[ Apologies for others, for leadin 'em away from ASing]
Fella, if you're so cool, you can do without the pseudonym.
Listen buddy, if your'e trying to start a flamewar, lets do it
on an another platform, lets keep this forum just for ASing
the way the manufacturer intended it to be used. :)
I 'am still amazed that your'e flaming me just for pointing
out the bug in your program. I take it sportingly when userz
point out bugz in my programz. Infact 'am better I fix 'em up.
Have a good weeknd.
--
Marilyn Monroe
Bring Back the Goddess Inc.
Don't tell me later that folks in Temple think the same way
folks in Heaven do.
=========================================================================
Date: Fri, 15 Apr 1994 14:42:37 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: What's with quiting?
In-Reply-To: <no.id> from "Stephen Jonke" at Apr 15, 94 01:13:28 pm
--Stephen Jonke wrote:
>
> tell application "Scriptable Text Editor"
> quit
> end tell
>
>I get an error reading:, "some parameter wasn't understood", highlighting
>the quit command. What's wrong with this?
You might need to say, "quit saving no" to get the STE to quit from
a tell statement. Personally, as long as you know that there are no
windows open, or anything that might need to be saved you could just
issue a: quit application "Scriptable Text Editor". This command has the
advantage that it will work with any running application.
-Hades
=========================================================================
Date: Fri, 15 Apr 1994 14:44:52 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Menu Events, Menu Grabber,
In-Reply-To: <no.id> from "The Goddess Lives" at Apr 15, 94 02:27:41 pm
--The Goddess Lives wrote:
>
>Listen buddy, if your'e trying to start a flamewar, lets do it
>on an another platform, lets keep this forum just for ASing
>the way the manufacturer intended it to be used. :)
One small point. This mainling list exists for the discussion of any
and all OSA or AppleScript compliant scripting systems. Not just
AppleScript. As it happens, AppleScript is currently the most talked
about environment on the list.
-Hades
=========================================================================
Date: Fri, 15 Apr 1994 13:52:10 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Menu Events, Menu Grabber,
In-Reply-To: Your message of "Fri, 15 Apr 94 10:56:00 EDT"
Ross,
>Fella, if you're so cool, you can do without the pseudonym.
>
>Ross Brown - AWOL Software Productions
>PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
>publisher of AWOL Utilities - "the best deal in freeware!"
>ab026@freenet.carleton.ca
I appreciate the time that you took to answer this person's questions. And I'm
also sensitive to the tone he/she used. Please, please don't respond to
his/her latest message in the list. I've sent a message to the individual
asking them to cease the flammage, and I'd appreciate your help (even though
your comment isn't so bad and I "slightly" agree with you). I really don't
want this stuff in the list. Period.
Thanks for your understanding.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Fri, 15 Apr 1994 15:54:19 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@KONG.GSFC.NASA.GOV>
Subject: [ignore] A bit of a test
Sorry if this annoys anybody.... I've been having problems with bounced
messages on this list (namely, my admin complains about bounced
acknowledgement messages), so I set my options to "NOACK" and am hoping
that I won't receive an "ACK". The last time I tried this it didn't seem
to stop the "ACK"'s :)
Actually, I suppose I could throw in a question - is there any way in
AppleScript to pause for x seconds (or milliseconds or whatever)? Using
repeat loops seems to be rather unreliable. Sometimes an empty loop for
10000 times finishes almost immediately, other times it takes several
seconds!
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Fri, 15 Apr 1994 15:17:20 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Igor Livshits <igorl@UIUC.EDU>
Subject: Re: Putting stuff on the clipboard?
>>Simple question, is there any way to place text (or whatever) into the
>>clipboard?
>
Menu Events 1.1.1 -- you could send a fake copy command (perhaps preceded
with a select all command].
Cheers, Igor
_____
NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424; Have a Coke and a smile :)
=========================================================================
Date: Fri, 15 Apr 1994 16:50:29 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: FrontMost Crash
Hello,
A while ago I posted a problem I was having with having a client
AppleScript tell FrontMost to do something. ( The full posting is at the
bottom of this e-mail. ) I also posted this AppleLink and got a speedy
reply from Uncle Dave of SDU. He was able to reproduce the problem and said
it was a bug. Below is his work around:
===========================================
SDU's reply
=================================================
Hello:
We are working on the problem.
Please use this code in the meantime:
on AddFile(theFile)
open window "Files To Get"
tell window "Files to Get"
copy the contents of listbox "File List" to stuff
copy stuff & {theFile} to the contents of listbox "File List"
end tell
end AddFile
Thanks,
Uncle Dave
Author: LEE.BUCK
=================================================
Original post
=================================================
Hello,
I am writing a simple test client-server system where the client is a an
AppleScript script and the server is a FaceSpan ( nee FrontMost ) created
app. The problem I am having is that when the FaceSpan command "make new
listbox item" ( see below ) gets executed, my Mac hangs ( cursor freezes )
or drops down into MacsBug. It is not consistent.
I have tried all kinds of things:
I am only using the extensions I need.
I have tried saving the FaceSpan app as a complete app or a mini app.
I wrapped a try-error handler around the troublemaker line.
When I call the "AddFile" handler from within the Server app itself it
works fine, but when I call the handler from a client script, I get the
hang.
I don't know what to try next. Anybody out there experience this type of
problem? I have not seen too much discussion of FrontMost on this list. I
hope it is OK to ask this type of question here.
========
Here are the scripts that make up the system. I cut out all the other
stuff. This code still bombs. By the way I am running System 7 Pro on an
fx.
Thanks.
Client Script
-----------------
tell application "Server"
activate
AddFile("junk")
activate current application
end tell
"Server Script" in FrontMost Project Script
---------------------------------------------------------
on AddFile(theFile)
open window "Files To Get"
set theListBox to listbox "File List" of window "Files To Get"
-- I have a valid reference here. I checked using display dialog.
make new listbox item at end of theListBox with properties
{contents:"junk"}
end AddFile
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Fri, 15 Apr 1994 18:28:30 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Charles Wiltgen <cwiltgen@MCS.COM>
Subject: Re: Menu Events, Menu Grabber,
Ross,
>I appreciate the time that you took to answer this person's questions. And I'm
>also sensitive to the tone he/she used. Please, please don't respond to
>his/her latest message in the list. I've sent a message to the individual
>asking them to cease the flammage, and I'd appreciate your help (even though
>your comment isn't so bad and I "slightly" agree with you). I really don't
>want this stuff in the list. Period.
Fred took the words right out of my mouth. I think a lot of people
appreciate the time you've put into your software, Ms. Monroe
notwithstanding.
--
Charles Wiltgen
MCSnet/Chicago
cwiltgen@mcs.net
=========================================================================
Date: Fri, 15 Apr 1994 18:42:46 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Allan R. Crump" <jhhw@CRL.COM>
Subject: where is app?
Ok, here's my problem.
*If I create an applet which can be run on several different machines,
every time that I install the applet and run it the first time it asks:
"Where is application Filemaker Pro 2.0?"
* If I setup a variable as follows:
copy localHardDrive & "Applications:Filemaker:Filemaker Pro 2.0" to appname
tell application appname
...
end tell
*But the applet freaks out because it cannot resolve the events it's
supposed to send to appname. Does anyone have any suggestions on this
one ??
You'd have my undying gratitude.
Allan Crump
=========================================================================
Date: Fri, 15 Apr 1994 22:47:02 +0000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Sperry <sperry@MATH.SCAROLINA.EDU>
Subject: Re: What's with quiting?
At 1:13 PM 4/15/94 -0400. Stephen Jonke wrote:
>Is there something non-obvious thing about how you are supposed to tell an
>application to quit? Every time I try to do something like:
>
> tell application "Scriptable Text Editor"
> quit
> end tell
>
>I get an error reading:, "some parameter wasn't understood", highlighting
>the quit command. What's wrong with this?
>
>Steve
>
>---------------------
> jonke@gsfc.nasa.gov
>---------------------
Steve is not hallucinating, I have the same problem and not just with
quit. It occurs, as near as I can tell, completely at random: sometimes a
script works, sometimes the same one doesn't. I have tried the various
options for quit, removing all extensions except AppleScript, removing
RamDoubler and a different machine. No luck. I've taken to try-ing quit
at the beginning of every script to see whether it will work this time.
Sometimes quitting AppleScript Editor ( I'm using 1.0 ) and then
relaunching it will fix things; sometimes even multiple machine restarts is
no help.
P.L.Sperry sperry@math.scarolina.edu
Department of Mathematics
University of South Carolina
Columbia,SC
=========================================================================
Date: Sat, 16 Apr 1994 11:06:13 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jeff Beebe <jeffbb@AOL.COM>
Subject: Re: What's with quiting?
You can be sure whether a parameter is necessary by checking the dictionary
of STE (use open dictionary in Script Editor File command).
Your best bet before quitting is make sure all your windows are closed,
and the STE close command does have the "saving yes/no/ask" optional
parameter.
=========================================================================
Date: Sat, 16 Apr 1994 11:11:11 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jeff Beebe <jeffbb@AOL.COM>
Subject: Re: Putting stuff on the clipboard?
There is an OSAX called clipboard which uses the commands "clipboard info",
"set the clipboard to", and "the clipboard" which will do what we want.
I just got it this week from a Gannett colleage, but its from Apple, by
Jon Pugh.
=========================================================================
Date: Sat, 16 Apr 1994 15:01:31 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jim Russell <jimr@ACCESS.DIGEX.NET>
Subject: AppleScript Language Guide (Addison-Wesley)
As excellent as this is, I was suprised to notice the following
(sorry if this is a FAQ-ish well known thing, I just got here):
(*
--from AppleScript Language Guide (AW), p181
31449600 / years
-- result: 1
-- actual result: Execution Error
-- The variable years is not defined
*)
31449600 / weeks --result: 52.0
days * 365 -- result: 31536000
copy days * 365 to mostYears
31449600 / mostYears -- result: 0.9972602739726
=========================================================================
Date: Sat, 16 Apr 1994 15:04:36 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jim Russell <jimr@ACCESS.DIGEX.NET>
Subject: Another dumb dates FAQ?
I give up. (The following script explains the problem)
(*Failing to find a definition of the domain or range
of AppleScript dates, I was curious to see if it
handled Pope Gregory's missing days. I never found
out, as something chokes in the following script
about 1902. Yet I can represent earlier dates that seem
to work ok, for example the next line entered as: date "1/1/1700" *)
date "Friday, January 1, 1700 12:00:00 AM"
-- result: as converted in the script, underlined (meaning??)
copy 0 to lastlen
set jan1 to date "Saturday, January 1, 1994 12:00:00 AM"
copy jan1 to nxtyr
repeat with yr from 1905 to 1000 by -1
set year of jan1 to yr
display dialog jan1 as string -- just to watch;wish it would take dates
set year of nxtyr to yr + 1
-- the next line fails for 1902 or any year earlier
set len to (nxtyr - jan1) / days -- result: execution error
--the result of a numeric operation was too large
if 1 < lastlen - len then -- leap years are ok
display dialog (yr as string) & "=" & len & "," & yr + 1 & "="
&
lastlen
end if
copy len to lastlen
end repeat
Make sense to anyone??
=========================================================================
Date: Sun, 17 Apr 1994 17:07:03 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Jon's Commands 1.1
I just sent Jon's Commands 1.1 to Info-Mac. It should appear on Sumex
shortly and assuming Fred isn't asleep, on gaea shortly thereafter.
Version 1.1 fixes a bug in "screen list" on machines without color, a bug
in "set clipboard to", passes a clean PC register in "execute FKEY",
changes the return result of finder selection to aliases, makes all the
file commands take lists and strings, and adds copyFile and walk folders,
plus coercions from strings to file specifications.
The "walk folders" command is a good one. It takes a list of files and
folders and a script object. It then recurses through all the files and
folders and for each file in these folders, it sends an open message to the
script provided. This makes it really simple to write file processing
scripts. Here's an example:
script foo
on open(f)
-- do your stuff to file f here
end open
end script
on open(theFiles)
walk folders theFiles with script foo
end open
That's all there is to it! I think it's cool!
Check it out at an archive near you (and if there isn't one, MOVE!).
Jon
=========================================================================
Date: Sun, 17 Apr 1994 17:06:42 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Add Dictionary Script
Here's a nifty script I wrote some time ago and forgot to mention.
If you use Leonard's OSA Menu extension and the AppleScript Script Editor
and any number of scriptable programs or scripting additions, then this
script is a "must have!" When you drop an app or osax onto this script
(saved as an application), it adds that application or scripting addition
to the Script Editor's OSA Menu.
Now, when you are in the Script Editor and say "Hmmm, what was the syntax
of that command in that super-nifty osax Jon's Commands?" ;) ;) you can
simply pull down the menu and the dictionary will open. Pretty damn handy!
This includes a run handler at the end which uses Jon's Commands to make
this work from the Finder's OSA Menu. If you don't want that or don't use
Jon's Commands, remove that handler. If you want it to work with the
scriptable Finder, change the run handler to:
tell app "Finder"
set x to selection
end tell
open x
Have fun!
Jon
----------8x-------------8x-----------------8x---------------
script bob
property dictFile : ""
tell application "Script Editor"
open {dictFile}
end tell
end script
on open (theFiles)
repeat with f in theFiles
set s to bob
set s's dictFile to (f as alias)
set t to f as string
set AppleScript's text item delimiters to {":"}
set fName to last text item of t
set folderName to ""
repeat with i from 1 to (number of text items of t) - 1
set folderName to folderName & text item i of t & ":=
"
end repeat
set AppleScript's text item delimiters to {}
set additionPath to (path to extensions folder as string) --
& "Scripting Additions:"
if folderName =82 additionPath then
set fName to space & fName & " Dictionary"
else
set fName to fName & " Dictionary"
end if
if number of characters of fName > 31 then
display dialog "Shorten this name, please." --
default answer fName
set fName to text returned of the result
if number of characters of fName > 31 then
set fName to characters 1 through 31 of fNam=
e
end if
end if
set p to (path to system folder as string) & --
"Scripts:Script Editor Scripts:" & fName
--display dialog p
store script s in file p replacing yes
end repeat
end open
on run
open (finder selection)
end run
=========================================================================
Date: Mon, 18 Apr 1994 08:50:45 +0100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Johan Solve <johan.solve@ITN.HH.SE>
Subject: Re: AppleScript speed (or slowness)
--Brian Hughes wrote:
> I don't know that much about scripting Eudora, but I do have a few
> comments and ideas on your scripts...
> >tell application "FileMaker Pro"
> > display dialog "Median: " & median & " kr" & return & return --
> > & "Lower quarter: " & undkvart & " kr" & return --
> > & "Upper quarter: " & uppkvart & " kr" buttons {"OK"} default --
> > button "OK"
> >end tell
>
> Why have you wrapped this display dialog command in a tell
> statement? You don't get or send any data from FM Pro in the display
> dialog command. This could be part of your problem right here.
Without the tell statement, I would expect the dialog to show up in the
script's layer instead of the FileMaker layer, resulting in an unwanted
notification. Am I right? (easy to try, haven't done it yet)
>
> >Eudora sort mail script:
> >---------
> >tell application "Eudora1.4.2"
>
> You could change this to: tell mail folder "" of application ... It
> would make all of your future references a little shorter.
This won't let me redirect mail to different mail folders (which I do in
the actual script I use now)
> > --activate -- disabled, faster if script is in foreground ?
> > set n to number of message of mailbox "In" of mail folder ""
> > set i to 1 -- use separate counter since the pointer should only
> > -- increase if we don't move a message
> > repeat with j from 1 to n
>
> Since you don't use j within the loop at all a slightly more
> efficient loop call might be "repeat n times".
Ah well, a leftover from a previous version of the script where j was used.
Good point!
> > [long script snippet deleted]
> >
> if exists message i of mailbox "In" of mail folder ""
> tell message i of mailbox "In" of mail folder ""
> set itsTo to field "To" & return & field "cc" & return --
> & field "sender"
> end tell
> end if
>
> I don't think you really need all of those try statements, but I
> could be wrong. If I'm right then what I wrote makes that whole thing
> just a little bit shorter. ;->
Shorter, yes, but will it work? What happens if there is no cc field in the
header? I'd expect an error.
Is it possibel to fetch the entire header record in one single call, and
extract the different fields within the script? This must be MUCH faster.
Thanks for comments!
_______________________________________________________________________
"
JOHAN SOLVE Department of Science and Technology
<johan.solve@itn.hh.se> Halmstad University, Sweden
=========================================================================
Date: Mon, 18 Apr 1994 11:17:45 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AppleScript speed (or slowness)
In-Reply-To: <no.id> from "Johan Solve" at Apr 18, 94 08:50:45 am
--Johan Solve wrote:
>
>Without the tell statement, I would expect the dialog to show up in the
>script's layer instead of the FileMaker layer, resulting in an unwanted
>notification. Am I right? (easy to try, haven't done it yet)
I don't know about where it will display, but what you said sounds
right. I thought you were running this as an Applet with FM Pro in the
background, not the foreground.
>> >tell application "Eudora1.4.2"
>>
>> You could change this to: tell mail folder "" of application ... It
>> would make all of your future references a little shorter.
>
>This won't let me redirect mail to different mail folders (which I do in
>the actual script I use now)
Good point.
>> if exists message i of mailbox "In" of mail folder ""
>> tell message i of mailbox "In" of mail folder ""
>> set itsTo to field "To" & return & field "cc" & return --
>> & field "sender"
>> end tell
>> end if
>Shorter, yes, but will it work? What happens if there is no cc field in the
>header? I'd expect an error.
Well, I really don't know because I don't use Eudora. But I would
expect if to return nothing.
>Is it possibel to fetch the entire header record in one single call, and
>extract the different fields within the script? This must be MUCH faster.
Again, I really don't know but I'm kind of surprised that the header
fields of a message aren't just listed as elements of the message class
as defined in the Eudora dictionary. I would think this is a much more
efficient way to handle it. This is also how the mail program that I do
use works.
-Hades
=========================================================================
Date: Mon, 18 Apr 1994 08:42:50 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: AppleScript speed (or slowness)
At 11:58 4/15/94 -0400, Brian V. Hughes wrote:
>>Eudora sort mail script:
>>---------
>>tell application "Eudora1.4.2"
>
> You could change this to: tell mail folder "" of application ... It
>would make all of your future references a little shorter.
Not here on my machine..."mail folder" isn't understood as being something
special until after something has told AppleScript to deal with application
"Eudora1.4.2". This sort of pattern works, though:
tell application "Eudora 2.0.2"
tell message -1 of mailbox "In" of mail folder ""
get field "From"
end tell
end tell
But it may not be relevant to Johan's needs, anyhow.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 18 Apr 1994 09:18:28 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: AppleScript speed (or slowness)
At 11:17 4/18/94 -0400, Brian V. Hughes wrote:
> Again, I really don't know but I'm kind of surprised that the header
>fields of a message aren't just listed as elements of the message class
>as defined in the Eudora dictionary. I would think this is a much more
>efficient way to handle it. This is also how the mail program that I do
>use works.
Perhaps the header fields are handled as they are because the set of all
headers is unknown (unbounded? whatever). There are a few expected ones,
and there can be any other ones that some foolish mailer wants to put in.
If I want, I can have header
X-Today-John-Weighs: nnn
although I shouldn't.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Mon, 18 Apr 1994 12:32:34 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: George Entenman <ge@MCNC.ORG>
Subject: How to distribute AppleScript?
If a company develops an application that uses AppleScript, it is possible
to distribute a runtime version of AppleScript with the application?
Does the company doing this have to pay to redistribute it?
Thanks.
George
P.S. I read the articles called "AppleScript Distribution License = $500",
but they don't seem to answer this question.
########################################################################
# George Entenman (ge@mcnc.org) #
# MCNC Center for Microelectronics Systems Technologies #
# P.O. Box 12889 #
# Research Triangle Park, NC 27709-2889 Besta e tu' #
# 919/248-1953 (voice) Se voce' na~o viver #
# 919/248-1455 (FAX) neste mundo.... #
########################################################################
=========================================================================
Date: Mon, 18 Apr 1994 13:21:08 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AppleScript speed (or slowness)
In-Reply-To: <no.id> from "John W. Baxter" at Apr 18, 94 09:18:28 am
--John W. Baxter wrote:
>
> Perhaps the header fields are handled as they are because the set of all
>headers is unknown (unbounded? whatever). There are a few expected ones,
>and there can be any other ones that some foolish mailer wants to put in.
>If I want, I can have header
> X-Today-John-Weighs: nnn
>although I shouldn't.
Ok, now I feel like an idiot. Especially since I always append a
custom header to all of my mail messages. You would think I would know
that this is the case. Thanks for clearing this up John.
-Hades
=========================================================================
Date: Mon, 18 Apr 1994 14:33:08 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: new files on gaea 4/18
Hi everyone,
You will find a couple of new files on gaea and a update.
John Baxter has contributed a couple of modern memory manager files for use
with Frontier and AppleScript. Both the osax and the UCMD detect whether the
"Modern Memory Manager" is active, returning true if it is, false if it isn't.
Useful if one has some applications which can't tolerate the new Memory
Manager. Source code included, along with a dumb sample AppleScript script,
and the needed glue table for Frontier.
You will also find a new version of Acid Jazz (1.2). The URLs are
ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/AcidJazz1.2v1.sit.hqx
ftp://gaea.kgs.ukans.edu/applescript/osaxen/modernMMosax.sit.hqx
ftp://gaea.kgs.ukans.ed/frontier/UCMDs/modernMMucmd.sit.hqx
Enjoy,
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Mon, 18 Apr 1994 16:49:19 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Steven L. Rohall" <slrohall@TASC.COM>
Subject: menubar scripting addition?
Does anybody know of an AppleScript scripting addition that allows a script
to display some text in the menubar (ala SuperClock)? Something along the
lines of "display dialog", but with the destination in the menubar instead
of a dialog box. An additional feature would be to have the text
clickable, like a button, so that the script could do something when the
text was clicked. Any ideas? I could probably do something similar with
Frontmost, but that seems a bit heavyweight for what I have in mind and the
text would be displayed in a window, not the menubar. Thanks,
-Steve.
+--------------------------------------------------------------+
| Steven L. Rohall |
| ________ _ ______ ______ |
| 55 Walkers Brook Drive / / \ / / / / |
| Reading, MA 01867-3297 / /___\ /______ / |
| Tel: (617)942-2000 / / \ // |
| Fax: (617)942-7100 / / \/______//______/ |
| slrohall@tasc.com |
| (MIME-conformant mail welcome.) |
+--------------------------------------------------------------+
=========================================================================
Date: Mon, 18 Apr 1994 18:17:18 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Charles Wiltgen <cwiltgen@MCS.COM>
Subject: Re: Off-hook OSAX
Hello,
Is there an OSAX that will allow me to tell if my line is off the hook?
I'd like to create a script that will occasionally get my mail, but I want
it to make sure I'm not calling in at the moment.
I'm also worried about it trying to start it someone's leaving a message on
my answering machine.
--
Charles Wiltgen
MCSnet/Chicago
cwiltgen@mcs.net
=========================================================================
Date: Mon, 18 Apr 1994 22:18:24 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Another dumb dates FAQ?
>I give up. (The following script explains the problem)
>(*Failing to find a definition of the domain or range
>of AppleScript dates, I was curious to see if it
>handled Pope Gregory's missing days. I never found
>out, as something chokes in the following script
>about 1902.
>copy 0 to lastlen
>set jan1 to date "Saturday, January 1, 1994 12:00:00 AM"
>copy jan1 to nxtyr
>repeat with yr from 1905 to 1000 by -1
> set year of jan1 to yr
> display dialog jan1 as string -- just to watch;wish it would take
dates
> set year of nxtyr to yr + 1
> -- the next line fails for 1902 or any year earlier
> set len to (nxtyr - jan1) / days -- result: execution error
> --the result of a numeric operation was too large
> if 1 < lastlen - len then -- leap years are ok
> display dialog (yr as string) & "=" & len & "," & yr + 1 & "="
>&
> lastlen
> end if
> copy len to lastlen
>end repeat
>
>Make sense to anyone??
Well, it makes sense. That is, it is an error whose presence makes sense.
The AppleScript date type is represented by the Macintosh LongDateTime
type, which is a 64-bit integer (formerly the SANE comp type, now the new
"wide" type, a struct with a high-order signed long and a low order
unsigned long).
Zero is the same place as the Mac clock's zero: Jan 1, 1904 at 00:00:00
(and the low word of the LongDateTime is equal to the Mac clock throughout
the range of the Mac clock). One second before 0 is of course -1. Which
is 64 1 bits. With a little careless code, dividing the difference of two
of those by a small number would produce a number which might seem very
large.
It appears that the following variation solves your (really, AppleScript's)
problem:
copy 0 to lastlen
set jan1 to date "Saturday, January 1, 1994 00:00:00"
copy jan1 to nxtyr
repeat with yr from 1905 to 1000 by -1
set year of jan1 to yr
display dialog jan1 as string -- just to watch;wish it would take dates
set year of nxtyr to yr + 1
-- the next line fails for 1902 or any year earlier
if yr > 1903 then -- JWB: the conditional and the else part are added
set len to (nxtyr - jan1) / days
else
set len to (jan1 - nxtyr) / days
end if
if 1 < lastlen - len then -- leap years are ok
display dialog (yr as string) & "=" & len & "," & yr + 1 & "=" &
lastlen
end if
copy len to lastlen
end repeat
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 19 Apr 1994 09:16:10 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jeff Beebe <jeffbb@AOL.COM>
Subject: Radio Buttons
When I build a dialog box in ResEdit with radio buttons, and then run it with
run dialog etc .... I can't get the radio button to stay on, whether enabled
or not in the DITL. How-to, anybody?
Also, how can I get a script to access fastest the DLOG? Can I load it as
a resource in the script itself and mark it to preload? How to call? "run
dialog name of me?" Anybody done this, tried that?
'Preshate help.
=========================================================================
Date: Tue, 19 Apr 1994 09:38:24 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lee K. Hoong" <lhoong@EMORYU1.CC.EMORY.EDU>
Subject: Re: How to distribute AppleScript?
>If a company develops an application that uses AppleScript, it is possible
>to distribute a runtime version of AppleScript with the application?
>Does the company doing this have to pay to redistribute it?
>
>Thanks.
>
> George
>
>P.S. I read the articles called "AppleScript Distribution License = $500",
>but they don't seem to answer this question.
There is a distribution license that comes with the AppleScript Scripter's
Toolkit. The license allows for the distribution of the AppleScript and
Frontmost Runtime software (AS extension, Frontmost extension) with any
scripts that you develop. The toolkit costs about $140. I found out from
Gary Little, the AppleScript Product Manager, that the $500 licensing fee
is required if you want to bundle additional AS-related software from Apple
(Script Editor, Scriptable Text Editor, etc.).
Lee.
Lee K. Hoong
Dept. of Chemistry, Emory University
Internet: lhoong@unix.cc.emory.edu | America On-line: LHOONG
Disclaimer: I speak for myself only, not for Emory University
=========================================================================
Date: Tue, 19 Apr 1994 15:37:18 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "William J. Jamison" <jami1@AOL.COM>
Subject: Re: menubar scripting addition?
I use the Tempo II+ externals, "Message" and "GetWindowName" to display
window names in the menu bar, works great for the purposes of eliminating
some guesswork in QK2. Thus somebody at Affinity (shameless plug) might be
able to point you in the right direction. :D
Jami1
=========================================================================
Date: Wed, 20 Apr 1994 01:52:38 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Ross Brown <ab026@FREENET.CARLETON.CA>
Subject: Menu Events / Menu Grabber 1.1.2 at gaea
Hello, scripters. Just a note to let you know that Menu Events
and Menu Grabber version 1.1.2 are at gaea.kgs.ukans.edu in the
incoming directory, on their way to applescript/addons.
Version 1.1.2 adds some nifty new stuff to the package:
1. Menu Events makes System-7-savvy non-scriptable applications
recordable as well as scriptable. Turn on recording, press
Caps Lock, and your menu selections will be recorded.
2. Menu Events and Menu Grabber now support the use of modifier
keys (Shift, Control, Option, Command) with menu selections.
3. You can script Query Menu and Select Menu Item commands to
applications such as BBEdit and ClarisWorks which use non-
standard 'MDEF's... if you dare. :-) This used to be an error.
These programs have extensive documentation which should handle
most questions you may have. And it's still free. Enjoy...
--
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Tue, 19 Apr 1994 22:59:54 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: AppleScript speed (or slowness)
>My guess is that the bottleneck is AppleEvents, or possibly AppleScript
>itself (I still use 1.0, waiting for the Goodman update...).
>I'm running a IIvx with 7.1.
>
>What are your opinions or suggestions when it comes to AppleScript speed
>when cooperating with applications? Is it a general rule to bring
>AppleEvent calls to a minimum? For example, the sort mail script could
>perhaps fetch the entire header in one AE call (don't know if Eudora
>supports this), and process the information further within AppleScript. Am
>I correct?
The problem is not AppleEvents, although they are the manifestation as far
as AppleScript is concerned. The real culprit is the Macintosh OS, in
particular, the Process Manager. It is the bottleneck for context
switches, of which two are necessary for each AppleEvent. Mind you, the
Process Manager is one of those places on the Macintosh that if you, as a
software engineer, touch it, you will go immediately insane. It has
happened to several people already.
Basically, the Process Manager is the heart of the hack known as
MultiFinder. It is crufty and ugly 68K assembly code. It is emulated on
the PowerPC. It is the embodiment of pure evil. ;)
So, since AppleEvents is inherently an interprocess communication system,
it has to deal implicitly with the process manager. If the process manager
is ever improved so that background apps get more time more regularly, then
I strongly suspect that AppleScript will see a marked improvement.
I also believe that this pokieness extends itself to Frontier too.
So, the short answer is Yes. Keep your AppleEvent transactions to a
minimum and tranfer larger chunks of data. Activate your programs to get
them into the front and dictating the time slices.
There ought to be a way to take a script and run it in the target
application's process via an osax which uses an OSASendProc to convert all
the AE into SendToSelf addressing. That would short circuit the process
manager. Hmm, I'll have to look into that.
Jon
=========================================================================
Date: Wed, 20 Apr 1994 09:56:40 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lynn W. Becker II" <lbecker@HP8C.NRL.NAVY.MIL>
Subject: Ugrading from the Tao Book AScript
In-Reply-To: from "Automatic digest processor" at Apr 20, 94 12:05 (midnight)
Is there an "upgrader" available to upgrade the version of
AS that came with the Tao of Applescript?
thanks!
Lynn B.
=========================================================================
Date: Wed, 20 Apr 1994 10:26:48 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jim Russell <jimr@ACCESS.DIGEX.NET>
Subject: Re: AppleScript speed (or slowness)
In-Reply-To: Your message of "Tue,
19 Apr 1994 22:59:54 PDT." <199404200743.AA29489@nfs1.digex.net>
I started some scripts to time various AppleScript operations on my Power
Book 140. The timing script calibrates itself to factor out the overhead of
the call to the operation being timed, which, on the PowerBook amounted to a
large 18ms or so. I tried it last night at home on a PowerMac 7100/66, and
was crushed to see that the overhead there rose to about 19ms. So far,
AppleScript seems to take times about equivalent to the timings I used to get
for HyperTalk.
=========================================================================
Date: Wed, 20 Apr 1994 10:37:23 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Barry Wolman <Barry_Wolman@TRANSARC.COM>
Subject: AppleScript Versions
I just joined this group, so this might be a FAQ ...
How does the version of AppleScript that comes with System 7 Pro
compare with the version in the separate AppleScript product and the
versions distributed with the AppleScript books. Does the version
bundled with System 7 Pro include the same documentation and extras
as the separate product?
Thanks,
Barry
----------------------------------------------------
Barry Wolman barry@transarc.com
Transarc Corporation 412/338-4364 (voice)
707 Grant Street 412/338-4404 (fax)
Pittsburgh, PA 15219
=========================================================================
Date: Wed, 20 Apr 1994 10:33:54 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Taylor Leaming H3-283 <leamingt@TOBOR.SPS.MOT.COM>
Subject: Re: Ugrading from the Tao Book AScript
> Is there an "upgrader" available to upgrade the version of
> AS that came with the Tao of Applescript?
I called the publisher of "Tao" about a month ago, and at that time
they had no update available, or plans for one.
You might try giving them a call and see if that has changed.
-Taylor
=========================================================================
Date: Wed, 20 Apr 1994 08:49:36 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: AppleScript speed (or slowness)
>[Jon's rantings about the process manager removed to save space ;]
>
>So, since AppleEvents is inherently an interprocess communication system,
>it has to deal implicitly with the process manager. If the process manager
>is ever improved so that background apps get more time more regularly, then
>I strongly suspect that AppleScript will see a marked improvement.
>
This whole "situation" will improve SIGNIFICANTLY with the next
major release of System Software (ie. 7.5) which includes an improved
Process Manager that interacts much better with AppleScript and AE's...
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
=========================================================================
Date: Wed, 20 Apr 1994 13:03:23 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
Subject: Can't get script to run!! Why?
Help! This is driving me nuts!
I *just* got version 1.1 of the AppleScript Developer's Kit from
Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
Started" manual)!
They say to go into the Script Editor, enter "RECORD" mode, and then
fire up the Scriptable Text Editor, type some text, change the style.
Then, stop recording.
Now. I have a simple script that looks like this:
tell application "Scriptable Text Editor"
activate
set selection to "Welcome to AppleScript"
select word 3 of document 1
set style of selection to italic
end tell
I save it as an Application called "My First Script", then I quit the
editor. Both editors, in fact.
Now. Whenever I double-click on the "My First Script" application, it
brings up the title box, and I click on "Run". It then immediately
quits, doing nothing.
What gives? This is a simple application -- and it doesn't work!!!
When I re-load it into the editor, and click on "run", it works fine.
HELP!!! It didn't take long for me to get frustrated with this!!
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
=========================================================================
Date: Wed, 20 Apr 1994 13:06:55 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: new versions of Menu Events and Jon's Commands
Hi everyone,
I've moved new versions of Menu Events, Menu Grabber, and Jon's commands into
the appropriate directories. Jon's already let everyone know about the new
features in his osax. Among other things, Ross Brown has added recordability
and support for non-standard menu definitions to Menu Events. You can find out
more about it from the file
ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
You will find the updated versions in
ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.2.sit.Hqx
ftp://gaea.kgs.ukans.edu/applescript/osaxen/JonsCommands.sit.hqx
Enjoy.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Wed, 20 Apr 1994 12:03:27 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Can't get script to run!! Why?
At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
>Now. I have a simple script that looks like this:
>
> tell application "Scriptable Text Editor"
> activate
> set selection to "Welcome to AppleScript"
> select word 3 of document 1
> set style of selection to italic
> end tell
>
>I save it as an Application called "My First Script", then I quit the
>editor. Both editors, in fact.
>
>Now. Whenever I double-click on the "My First Script" application, it
>brings up the title box, and I click on "Run". It then immediately
>quits, doing nothing.
Hmmm...what fails for you, there, works for me, here. [AppleScript 1.1,
etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
I'd suspect something in your installation. What does this variation do?
1. By hand, start Scriptable Text Editor. You should have a blank
untiltled document (choose New from the File menu if that isn't true).
2. Double click on your saved script application.
If that works, now try quitting Scriptable Text Editor, and once again
double-clicking the saved script application.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 20 Apr 1994 13:13:33 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: AppleScript speed (or slowness)
At 10:59 PM 4/19/94 -0700, Jon Pugh wrote:
(explanation of process manager deleted)
>
>There ought to be a way to take a script and run it in the target
>application's process via an osax which uses an OSASendProc to convert all
>the AE into SendToSelf addressing. That would short circuit the process
>manager. Hmm, I'll have to look into that.
>
This would speed things up dramatically. Several of the enhacements in
Frontier such system event handlers make a very big difference in the
speed. Sending more data in each event also helps a lot.
Right now I'm fighting with Excel trying to speed up data transfers from
another application. I found that setting a cell at a time (which is the
easiest way in UserTalk) is painfully slow, but creating an array and
sending it to a range is a very big improvement. As for my own application
(which transfers data to/from a Newton), I was able to improve things a lot
by having a single event do something like "get next n records" rather than
getting a single record per event.
_______________________________________________________________
Mike Cohen
ISIS International | "Software that means business"
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
=========================================================================
Date: Wed, 20 Apr 1994 16:16:26 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
Subject: Re: Can't get script to run!! Why?
In-Reply-To: <199404201947.PAA24091@mbunix.mitre.org> from "John W. Baxter" at
Apr 20, 94 12:03:27 pm
>
> Hmmm...what fails for you, there, works for me, here. [AppleScript 1.1,
> etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
>
> I'd suspect something in your installation. What does this variation do?
>
Stranger and stranger:
- If I record my actions and let the Script Editor build
the script for me, then immediately save the script as an
application, the resulting application doesn't work. By
this, I mean that when I double-click on the application,
it launches, asks me if I want to run it, then it just
quits.
- If, however, I record actions and then modify the script
somehow (even just type a "space" into the editor box),
then save it as an application, it works!!
I don't get it. I've installed the s/w on three machines now, and they
all do the same thing. (A Workgroup Server 60, a PowerBook 170, and a
Mac IIsi.)
Any ideas??
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
=========================================================================
Date: Wed, 20 Apr 1994 16:34:28 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
Subject: Re: Can't get script to run!! Why?
In-Reply-To: <199404201947.PAA24091@mbunix.mitre.org> from "John W. Baxter" at
Apr 20, 94 12:03:27 pm
>
> At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
> >Now. I have a simple script that looks like this:
> >
> > tell application "Scriptable Text Editor"
> > activate
> > set selection to "Welcome to AppleScript"
> > select word 3 of document 1
> > set style of selection to italic
> > end tell
> >
> >I save it as an Application called "My First Script", then I quit the
> >editor. Both editors, in fact.
> >
> >Now. Whenever I double-click on the "My First Script" application, it
> >brings up the title box, and I click on "Run". It then immediately
> >quits, doing nothing.
>
Even stranger::
If I take the script that I recorded, select it, copy it, paste it
into new script, then run the new script as an application, it works!
The original stil doesn't work.
My thoughts are that for some reason, I can't run a "recorded" script.
Any ideas why that might be so? Is there any difference between a
"recorded" script and one that I just typed in directly?
I'm so confused..
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
=========================================================================
Date: Wed, 20 Apr 1994 14:24:54 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Can't get script to run!! Why?
At 16:16 4/20/94 -0400, Marc N. Cannava wrote:
> - If I record my actions and let the Script Editor build
> the script for me, then immediately save the script as an
> application, the resulting application doesn't work. By
> this, I mean that when I double-click on the application,
> it launches, asks me if I want to run it, then it just
> quits.
>
>
> - If, however, I record actions and then modify the script
> somehow (even just type a "space" into the editor box),
> then save it as an application, it works!!
Hmmm...making any change and then saving causes the script to be compiled
again. Simply changing it probably doesn't. Something about the
compilation fixes something (quite likely the form in which
application "Scriptable Text Editor"
is stored in the compiled script.)
I don't think it *should* work that way. [I had in fact changed the
recorded script slightly...when I follow your recipe correctly, I get the
same effect you do.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 20 Apr 1994 10:41:02 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "David Rogers,Eng" <david.rogers@ALDUS.COM>
Organization: Aldus Corporation, Seattle, WA
Subject: Re: Can't get script to run!! Why?
Marc,
The script you sent works fine on my machine and I am using AS 1.1. Two
things: 1) Make sure you check the syntax of the script before saving. 2)
When you save as an application check the "Never Show Startup Screen"
button.
Regards,
David
---------------------------------------------------------------------------
david.rogers@aldus.com -========)-- Frodo Lives
--(========-
---------------------------------------------------------------------------
_______________________________________________________________________________
From: Macintosh Scripting Systems on Wed, Apr 20, 1994 10:09 AM
Subject: Can't get script to run!! Why?
To: David Rogers,Eng
Help! This is driving me nuts!
I *just* got version 1.1 of the AppleScript Developer's Kit from
Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
Started" manual)!
They say to go into the Script Editor, enter "RECORD" mode, and then
fire up the Scriptable Text Editor, type some text, change the style.
Then, stop recording.
Now. I have a simple script that looks like this:
tell application "Scriptable Text Editor"
activate
set selection to "Welcome to AppleScript"
select word 3 of document 1
set style of selection to italic
end tell
I save it as an Application called "My First Script", then I quit the
editor. Both editors, in fact.
Now. Whenever I double-click on the "My First Script" application, it
brings up the title box, and I click on "Run". It then immediately
quits, doing nothing.
What gives? This is a simple application -- and it doesn't work!!!
When I re-load it into the editor, and click on "run", it works fine.
HELP!!! It didn't take long for me to get frustrated with this!!
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
=========================================================================
Date: Wed, 20 Apr 1994 20:39:07 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Allan R. Crump" <jhhw@CRL.COM>
Subject: Re: Can't get script to run!! Why?
In-Reply-To: <199404201925.AA28312@mail.crl.com>
Why not try copying the script into Script Editor and running it from
there ? You could probably trap it with some dialog messages and see
what it's doing...
(just my 2cents worth)
On Wed, 20 Apr 1994, John W. Baxter wrote:
> At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
> >Now. I have a simple script that looks like this:
> >
> > tell application "Scriptable Text Editor"
> > activate
> > set selection to "Welcome to AppleScript"
> > select word 3 of document 1
> > set style of selection to italic
> > end tell
> >
> >I save it as an Application called "My First Script", then I quit the
> >editor. Both editors, in fact.
> >
> >Now. Whenever I double-click on the "My First Script" application, it
> >brings up the title box, and I click on "Run". It then immediately
> >quits, doing nothing.
>
>
> Hmmm...what fails for you, there, works for me, here. [AppleScript 1.1,
> etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
>
> I'd suspect something in your installation. What does this variation do?
>
> 1. By hand, start Scriptable Text Editor. You should have a blank
> untiltled document (choose New from the File menu if that isn't true).
>
> 2. Double click on your saved script application.
>
>
> If that works, now try quitting Scriptable Text Editor, and once again
> double-clicking the saved script application.
>
> --John
>
> --
> jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
> finger me to prove I'm all wet (Port Ludlow rainfall numbers).
>
=========================================================================
Date: Thu, 21 Apr 1994 12:03:10 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
Subject: Re: AppleScript speed (or slowness)
> This whole "situation" will improve SIGNIFICANTLY with the next
>major release of System Software (ie. 7.5) which includes an improved
>Process Manager that interacts much better with AppleScript and AE's...
Speaking of speeding things up. I now have my PPC card for my Q610 and
Stuffit Expander is Oh So Slow compared to before. Does it make Native
versions arrive any faster if I send dollars :-) And how much is Stuffit
Deluxe?
Cheers,
Craig
--
Craig Richmond, Computer Officer, ECEL Computing Services +61 9 380 1405
The University of Western Australia or 380 3860 Email for FAX Number
craig@ecel.uwa.edu.au Dvorak Keyboards RULE! "Messes are only acceptable
if users make them. Applications aren't allowed this freedom" I.M.VI 2-4
=========================================================================
Date: Wed, 20 Apr 1994 13:24:39 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was rogerk@UNPC.QUEERNET.ORG
From: Automatic digest processor <LISTSERV@DARTCMS1.DARTMOUTH.EDU>
Subject: MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
There are 17 messages totalling 586 lines in this issue.
Topics of the day:
1. Menu Events / Menu Grabber 1.1.2 at gaea
2. AppleScript speed (or slowness) (5)
3. Ugrading from the Tao Book AScript (2)
4. AppleScript Versions
5. Can't get script to run!! Why? (7)
6. new versions of Menu Events and Jon's Commands
----------------------------------------------------------------------
Date: Wed, 20 Apr 1994 01:52:38 -0400
From: Ross Brown <ab026@FREENET.CARLETON.CA>
Subject: Menu Events / Menu Grabber 1.1.2 at gaea
Hello, scripters. Just a note to let you know that Menu Events
and Menu Grabber version 1.1.2 are at gaea.kgs.ukans.edu in the
incoming directory, on their way to applescript/addons.
Version 1.1.2 adds some nifty new stuff to the package:
1. Menu Events makes System-7-savvy non-scriptable applications
recordable as well as scriptable. Turn on recording, press
Caps Lock, and your menu selections will be recorded.
2. Menu Events and Menu Grabber now support the use of modifier
keys (Shift, Control, Option, Command) with menu selections.
3. You can script Query Menu and Select Menu Item commands to
applications such as BBEdit and ClarisWorks which use non-
standard 'MDEF's... if you dare. :-) This used to be an error.
These programs have extensive documentation which should handle
most questions you may have. And it's still free. Enjoy...
--
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
------------------------------
Date: Tue, 19 Apr 1994 22:59:54 -0700
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: AppleScript speed (or slowness)
>My guess is that the bottleneck is AppleEvents, or possibly AppleScript
>itself (I still use 1.0, waiting for the Goodman update...).
>I'm running a IIvx with 7.1.
>
>What are your opinions or suggestions when it comes to AppleScript speed
>when cooperating with applications? Is it a general rule to bring
>AppleEvent calls to a minimum? For example, the sort mail script could
>perhaps fetch the entire header in one AE call (don't know if Eudora
>supports this), and process the information further within AppleScript. Am
>I correct?
The problem is not AppleEvents, although they are the manifestation as far
as AppleScript is concerned. The real culprit is the Macintosh OS, in
particular, the Process Manager. It is the bottleneck for context
switches, of which two are necessary for each AppleEvent. Mind you, the
Process Manager is one of those places on the Macintosh that if you, as a
software engineer, touch it, you will go immediately insane. It has
happened to several people already.
Basically, the Process Manager is the heart of the hack known as
MultiFinder. It is crufty and ugly 68K assembly code. It is emulated on
the PowerPC. It is the embodiment of pure evil. ;)
So, since AppleEvents is inherently an interprocess communication system,
it has to deal implicitly with the process manager. If the process manager
is ever improved so that background apps get more time more regularly, then
I strongly suspect that AppleScript will see a marked improvement.
I also believe that this pokieness extends itself to Frontier too.
So, the short answer is Yes. Keep your AppleEvent transactions to a
minimum and tranfer larger chunks of data. Activate your programs to get
them into the front and dictating the time slices.
There ought to be a way to take a script and run it in the target
application's process via an osax which uses an OSASendProc to convert all
the AE into SendToSelf addressing. That would short circuit the process
manager. Hmm, I'll have to look into that.
Jon
------------------------------
Date: Wed, 20 Apr 1994 09:56:40 EDT
From: "Lynn W. Becker II" <lbecker@HP8C.NRL.NAVY.MIL>
Subject: Ugrading from the Tao Book AScript
Is there an "upgrader" available to upgrade the version of
AS that came with the Tao of Applescript?
thanks!
Lynn B.
------------------------------
Date: Wed, 20 Apr 1994 10:26:48 -0400
From: Jim Russell <jimr@ACCESS.DIGEX.NET>
Subject: Re: AppleScript speed (or slowness)
I started some scripts to time various AppleScript operations on my Power
Book 140. The timing script calibrates itself to factor out the overhead of
the call to the operation being timed, which, on the PowerBook amounted to a
large 18ms or so. I tried it last night at home on a PowerMac 7100/66, and
was crushed to see that the overhead there rose to about 19ms. So far,
AppleScript seems to take times about equivalent to the timings I used to get
for HyperTalk.
------------------------------
Date: Wed, 20 Apr 1994 10:37:23 -0400
From: Barry Wolman <Barry_Wolman@TRANSARC.COM>
Subject: AppleScript Versions
I just joined this group, so this might be a FAQ ...
How does the version of AppleScript that comes with System 7 Pro
compare with the version in the separate AppleScript product and the
versions distributed with the AppleScript books. Does the version
bundled with System 7 Pro include the same documentation and extras
as the separate product?
Thanks,
Barry
----------------------------------------------------
Barry Wolman barry@transarc.com
Transarc Corporation 412/338-4364 (voice)
707 Grant Street 412/338-4404 (fax)
Pittsburgh, PA 15219
------------------------------
Date: Wed, 20 Apr 1994 10:33:54 CDT
From: Taylor Leaming H3-283 <leamingt@TOBOR.SPS.MOT.COM>
Subject: Re: Ugrading from the Tao Book AScript
> Is there an "upgrader" available to upgrade the version of
> AS that came with the Tao of Applescript?
I called the publisher of "Tao" about a month ago, and at that time
they had no update available, or plans for one.
You might try giving them a call and see if that has changed.
-Taylor
------------------------------
Date: Wed, 20 Apr 1994 08:49:36 -0800
From: Leonard Rosenthol <leonardr@NETCOM.COM>
Subject: Re: AppleScript speed (or slowness)
>[Jon's rantings about the process manager removed to save space ;]
>
>So, since AppleEvents is inherently an interprocess communication system,
>it has to deal implicitly with the process manager. If the process manager
>is ever improved so that background apps get more time more regularly, then
>I strongly suspect that AppleScript will see a marked improvement.
>
This whole "situation" will improve SIGNIFICANTLY with the next
major release of System Software (ie. 7.5) which includes an improved
Process Manager that interacts much better with AppleScript and AE's...
Leonard
-----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@netcom.com
Director of Advanced Technology AppleLink: MACgician
Aladdin Systems, Inc. GEnie: MACgician
------------------------------
Date: Wed, 20 Apr 1994 13:03:23 -0400
From: "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
Subject: Can't get script to run!! Why?
Help! This is driving me nuts!
I *just* got version 1.1 of the AppleScript Developer's Kit from
Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
Started" manual)!
They say to go into the Script Editor, enter "RECORD" mode, and then
fire up the Scriptable Text Editor, type some text, change the style.
Then, stop recording.
Now. I have a simple script that looks like this:
tell application "Scriptable Text Editor"
activate
set selection to "Welcome to AppleScript"
select word 3 of document 1
set style of selection to italic
end tell
I save it as an Application called "My First Script", then I quit the
editor. Both editors, in fact.
Now. Whenever I double-click on the "My First Script" application, it
brings up the title box, and I click on "Run". It then immediately
quits, doing nothing.
What gives? This is a simple application -- and it doesn't work!!!
When I re-load it into the editor, and click on "run", it works fine.
HELP!!! It didn't take long for me to get frustrated with this!!
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
------------------------------
Date: Wed, 20 Apr 1994 13:06:55 -0500
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: new versions of Menu Events and Jon's Commands
Hi everyone,
I've moved new versions of Menu Events, Menu Grabber, and Jon's commands into
the appropriate directories. Jon's already let everyone know about the new
features in his osax. Among other things, Ross Brown has added recordability
and support for non-standard menu definitions to Menu Events. You can find out
more about it from the file
ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
You will find the updated versions in
ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.2.sit.Hqx
ftp://gaea.kgs.ukans.edu/applescript/osaxen/JonsCommands.sit.hqx
Enjoy.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
------------------------------
Date: Wed, 20 Apr 1994 12:03:27 -0700
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Can't get script to run!! Why?
At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
>Now. I have a simple script that looks like this:
>
> tell application "Scriptable Text Editor"
> activate
> set selection to "Welcome to AppleScript"
> select word 3 of document 1
> set style of selection to italic
> end tell
>
>I save it as an Application called "My First Script", then I quit the
>editor. Both editors, in fact.
>
>Now. Whenever I double-click on the "My First Script" application, it
>brings up the title box, and I click on "Run". It then immediately
>quits, doing nothing.
Hmmm...what fails for you, there, works for me, here. [AppleScript 1.1,
etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
I'd suspect something in your installation. What does this variation do?
1. By hand, start Scriptable Text Editor. You should have a blank
untiltled document (choose New from the File menu if that isn't true).
2. Double click on your saved script application.
If that works, now try quitting Scriptable Text Editor, and once again
double-clicking the saved script application.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
------------------------------
Date: Wed, 20 Apr 1994 13:13:33 -0800
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: AppleScript speed (or slowness)
At 10:59 PM 4/19/94 -0700, Jon Pugh wrote:
(explanation of process manager deleted)
>
>There ought to be a way to take a script and run it in the target
>application's process via an osax which uses an OSASendProc to convert all
>the AE into SendToSelf addressing. That would short circuit the process
>manager. Hmm, I'll have to look into that.
>
This would speed things up dramatically. Several of the enhacements in
Frontier such system event handlers make a very big difference in the
speed. Sending more data in each event also helps a lot.
Right now I'm fighting with Excel trying to speed up data transfers from
another application. I found that setting a cell at a time (which is the
easiest way in UserTalk) is painfully slow, but creating an array and
sending it to a range is a very big improvement. As for my own application
(which transfers data to/from a Newton), I was able to improve things a lot
by having a single event do something like "get next n records" rather than
getting a single record per event.
_______________________________________________________________
Mike Cohen
ISIS International | "Software that means business"
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
------------------------------
Date: Wed, 20 Apr 1994 16:16:26 -0400
From: "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
Subject: Re: Can't get script to run!! Why?
>
> Hmmm...what fails for you, there, works for me, here. [AppleScript 1.1,
> etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
>
> I'd suspect something in your installation. What does this variation do?
>
Stranger and stranger:
- If I record my actions and let the Script Editor build
the script for me, then immediately save the script as an
application, the resulting application doesn't work. By
this, I mean that when I double-click on the application,
it launches, asks me if I want to run it, then it just
quits.
- If, however, I record actions and then modify the script
somehow (even just type a "space" into the editor box),
then save it as an application, it works!!
I don't get it. I've installed the s/w on three machines now, and they
all do the same thing. (A Workgroup Server 60, a PowerBook 170, and a
Mac IIsi.)
Any ideas??
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
------------------------------
Date: Wed, 20 Apr 1994 16:34:28 -0400
From: "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
Subject: Re: Can't get script to run!! Why?
>
> At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
> >Now. I have a simple script that looks like this:
> >
> > tell application "Scriptable Text Editor"
> > activate
> > set selection to "Welcome to AppleScript"
> > select word 3 of document 1
> > set style of selection to italic
> > end tell
> >
> >I save it as an Application called "My First Script", then I quit the
> >editor. Both editors, in fact.
> >
> >Now. Whenever I double-click on the "My First Script" application, it
> >brings up the title box, and I click on "Run". It then immediately
> >quits, doing nothing.
>
Even stranger::
If I take the script that I recorded, select it, copy it, paste it
into new script, then run the new script as an application, it works!
The original stil doesn't work.
My thoughts are that for some reason, I can't run a "recorded" script.
Any ideas why that might be so? Is there any difference between a
"recorded" script and one that I just typed in directly?
I'm so confused..
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
------------------------------
Date: Wed, 20 Apr 1994 14:24:54 -0700
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Can't get script to run!! Why?
At 16:16 4/20/94 -0400, Marc N. Cannava wrote:
> - If I record my actions and let the Script Editor build
> the script for me, then immediately save the script as an
> application, the resulting application doesn't work. By
> this, I mean that when I double-click on the application,
> it launches, asks me if I want to run it, then it just
> quits.
>
>
> - If, however, I record actions and then modify the script
> somehow (even just type a "space" into the editor box),
> then save it as an application, it works!!
Hmmm...making any change and then saving causes the script to be compiled
again. Simply changing it probably doesn't. Something about the
compilation fixes something (quite likely the form in which
application "Scriptable Text Editor"
is stored in the compiled script.)
I don't think it *should* work that way. [I had in fact changed the
recorded script slightly...when I follow your recipe correctly, I get the
same effect you do.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
------------------------------
Date: Wed, 20 Apr 1994 10:41:02 PDT
From: "David Rogers,Eng" <david.rogers@ALDUS.COM>
Subject: Re: Can't get script to run!! Why?
Marc,
The script you sent works fine on my machine and I am using AS 1.1. Two
things: 1) Make sure you check the syntax of the script before saving. 2)
When you save as an application check the "Never Show Startup Screen"
button.
Regards,
David
---------------------------------------------------------------------------
david.rogers@aldus.com -========)-- Frodo Lives
--(========-
---------------------------------------------------------------------------
_______________________________________________________________________________
From: Macintosh Scripting Systems on Wed, Apr 20, 1994 10:09 AM
Subject: Can't get script to run!! Why?
To: David Rogers,Eng
Help! This is driving me nuts!
I *just* got version 1.1 of the AppleScript Developer's Kit from
Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
Started" manual)!
They say to go into the Script Editor, enter "RECORD" mode, and then
fire up the Scriptable Text Editor, type some text, change the style.
Then, stop recording.
Now. I have a simple script that looks like this:
tell application "Scriptable Text Editor"
activate
set selection to "Welcome to AppleScript"
select word 3 of document 1
set style of selection to italic
end tell
I save it as an Application called "My First Script", then I quit the
editor. Both editors, in fact.
Now. Whenever I double-click on the "My First Script" application, it
brings up the title box, and I click on "Run". It then immediately
quits, doing nothing.
What gives? This is a simple application -- and it doesn't work!!!
When I re-load it into the editor, and click on "run", it works fine.
HELP!!! It didn't take long for me to get frustrated with this!!
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
------------------------------
Date: Wed, 20 Apr 1994 20:39:07 -0700
From: "Allan R. Crump" <jhhw@CRL.COM>
Subject: Re: Can't get script to run!! Why?
Why not try copying the script into Script Editor and running it from
there ? You could probably trap it with some dialog messages and see
what it's doing...
(just my 2cents worth)
On Wed, 20 Apr 1994, John W. Baxter wrote:
> At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
> >Now. I have a simple script that looks like this:
> >
> > tell application "Scriptable Text Editor"
> > activate
> > set selection to "Welcome to AppleScript"
> > select word 3 of document 1
> > set style of selection to italic
> > end tell
> >
> >I save it as an Application called "My First Script", then I quit the
> >editor. Both editors, in fact.
> >
> >Now. Whenever I double-click on the "My First Script" application, it
> >brings up the title box, and I click on "Run". It then immediately
> >quits, doing nothing.
>
>
> Hmmm...what fails for you, there, works for me, here. [AppleScript 1.1,
> etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
>
> I'd suspect something in your installation. What does this variation do?
>
> 1. By hand, start Scriptable Text Editor. You should have a blank
> untiltled document (choose New from the File menu if that isn't true).
>
> 2. Double click on your saved script application.
>
>
> If that works, now try quitting Scriptable Text Editor, and once again
> double-clicking the saved script application.
>
> --John
>
> --
> jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
> finger me to prove I'm all wet (Port Ludlow rainfall numbers).
>
------------------------------
Date: Thu, 21 Apr 1994 12:03:10 +0800
From: Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
Subject: Re: AppleScript speed (or slowness)
> This whole "situation" will improve SIGNIFICANTLY with the next
>major release of System Software (ie. 7.5) which includes an improved
>Process Manager that interacts much better with AppleScript and AE's...
Speaking of speeding things up. I now have my PPC card for my Q610 and
Stuffit Expander is Oh So Slow compared to before. Does it make Native
versions arrive any faster if I send dollars :-) And how much is Stuffit
Deluxe?
Cheers,
Craig
--
Craig Richmond, Computer Officer, ECEL Computing Services +61 9 380 1405
The University of Western Australia or 380 3860 Email for FAX Number
craig@ecel.uwa.edu.au Dvorak Keyboards RULE! "Messes are only acceptable
if users make them. Applications aren't allowed this freedom" I.M.VI 2-4
------------------------------
End of MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
***************************************************
=========================================================================
Date: Wed, 20 Apr 1994 23:42:43 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: AppleScript speed & packing Apple events
In light of recent discussion indicating that modest speed-ups can be had
by sending fewer individual apple events, I would like to try to use the
full form of Eudora's 'make' event:
make ObjectClass message InsertHere end of mailbox "Out" of mail folder ""
[with data] [with properties]
rather than a 'make' plus a handful of 'set's, but haven't had any luck
divining the syntax.
Has anyone tried this successfully? If so, I'd love to know how.
Many thanks!
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "The city is a place where a small boy, as he walks
System Administrator through it, may see something that will tell him what
CoVis Project he wants to do his whole life."
Northwestern Univ.
--Louis I. Kahn
E-mail: donovan@covis.nwu.edu
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Thu, 21 Apr 1994 00:11:55 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
>Even stranger::
>
>If I take the script that I recorded, select it, copy it, paste it
>into new script, then run the new script as an application, it works!
>The original stil doesn't work.
>
>My thoughts are that for some reason, I can't run a "recorded" script.
>Any ideas why that might be so? Is there any difference between a
>"recorded" script and one that I just typed in directly?
>
>I'm so confused..
This is a bug in AppleScript 1.0 that was fixed in 1.1 because I reported
it and Warren fixed it. Isn't that special? ;)
The detail is that OSAStopRecording returns a handler instead of a script
object. The bug wasn't noticed because OSAStopRecording doesn't take a
modeFlags parameter and it needed to be kOSAModeCompileIntoContext instead
of kOSAModeNull (and was changed so in 1.1). Since everyone seemed to
re-record their scripts it got missed. In fact, the workaround is simply
to compile your script again. Imagine that.
Handlers are collections of subroutines, but don't involve properties or
any saved state information. That's what a context consists of in
AppleScript. Every script has an implicit "script <name>" and "end script"
around it. As you should know, you also have a implicit "on run" handler
around your miscellaneous script statements which can be strewn throughout
your code like so:
beep
on open (theFiles)
end open
display dialog "Foo!"
Script objects are one of the way cool things about AppleScript. You can
do some pretty nifty stuff with them. See my Walk Folder osax for a decent
example of one use for them. Another use was in my OSA Menu script that I
recently posted.
Basically, scripts are:
script <name>
<prop | property> <propName> : <initial compile time value>
on <handlerName>[(params)]
[statements]
end [<handlerName>]
end [<name>]
You can have 0 or more properties and 0 or more handlers. Thus, script
objects can retain values in their properties, giving them persistent
storage. The important thing is that the specified initial value will be
used whenever the script is compiled and will always be displayed when
viewed. You cannot directly see the current value of a property. You need
to write a script (naturally) which does a "load script" on the script
resource file and then runs a script like "foo's propName" or "propName of
foo" which evaluates to the current property value. If you want a script
to retain its value, then I strongly recommend never putting code into it
and/or making it read only.
Well, that's the ramble for today. Oh, here's a typing-saver tip. You can
use app for application in your tell statement. It will be expanded.
Jon
=========================================================================
Date: Thu, 21 Apr 1994 00:03:00 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Joseph Block <0006316815@MCIMAIL.COM>
Subject: Cheap LISTSERV reception, t
If you get two of these, it is because my machine crashed while
sending the first
This is going to several lists since it is getting to be that time of
year when students lose access again.
No flames for being off topic or commercial please; I'm providing
this information as a recommendation from a satisfied customer and
gain nothing (in fact I'm paying to send it) if you decide to act
upon it other than your continued participation in these lists.
MCIMail allows unlimited free message reception for $35 annually.
There is no connect time charge for downloading the messages on the
9600 baud 800 number. Outgoing messages are charged per message,
depending on the number of characters. Admittedly the outgoing mail
isn't cheap, but you can use Cserve/AOL/Delphi/Whatever for that.
MCIMail also has a special student rate that is (I think) $5 per
month, but includes 100 free outgoing messages (the first 500 chars
anyway). I don't happen to have the 800 number with me. Other than
a free account, it is hard to beat $3 a month for your email fix.
You should also contact netcom (info@netcom.com) about their service.
Also, check out Intercon's WorldLink.
=========================================================================
Date: Thu, 21 Apr 1994 09:53:57 GMT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jean-Michel Beuken <beuken@PCPM.UCL.AC.BE>
Subject: "keyword" parameter in Frontier Script
hello,
How is it possible to use the "keyword" parameter in Frontier Script ?
Here above, You can see a piece of code to send a AppleEvent to Frontier.
I create an script in 'system.verbs.traps.igor.test'
All work perfectly ! Frontier receives the two parameters and the
application receive well the returned parameter.
But my question is : is it possible in Frontier to know the "keyword" (here
'typl' or 'typs') associated to the value ?
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
.
.
.
static long serverid =3D 'LAND' /* Userland Frontier is the server */
static Boolean NewAppleEvent (OSType verbtoken, AppleEvent *event) {
AEAddressDesc adr;
OSErr ec;
ec =3D AECreateDesc(typeApplSignature, (Ptr)
&serverid,sizeof(serverid), &adr);
ec =3D AECreateAppleEvent ('igor', verbtoken, &adr, kAutoGenerateRetu=
rnID,
kAnyTransactionID, event);
AEDisposeDesc (&adr);
return (ec =3D=3D noErr);
}
static int
Xdummy() {
AppleEvent event, reply;
long idlong =3D 33;
short idshort =3D 11;
Boolean fl;
if (!NewAppleEvent ('test', &event))
return (false);
if (!PushLongParam (idlong, 'typl', &event))
return (false);
if (!PushShortParam (idshort, 'typs', &event))
return (false);
if (!SendAppleEvent (&event, &reply, false))
return (false);
fl =3D GetLongParam (&reply, keyDirectObject, &idlong);
AEDisposeDesc (&reply);
return(0)
}
.
.
.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
system.verbs.traps.igor.test :
-----------------------------
on test (idlong,idshort) {
Frontier.bringToFront();;
msg("receiving : " + idlong + ", " + idshort );
=AB il1 =3D getEventAttribute ('typl') /* doesn't work=
! */
Igor.bringToFront();
return (99)
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
-------------------------------------------------------------
Dr Ir Jean-Michel Beuken
Computer Scientist & Network Manager
University of Louvain-La-Neuve
Lab. PCPM/FSA, Bat. BOLTZMANN
1,Place Croix du Sud
1348 Louvain-La-Neuve
BELGIUM
=46ax (3210)473452
-------------------------------------------------------------
=========================================================================
Date: Thu, 21 Apr 1994 17:16:07 +0930
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Baily <paulb@RANDOMSA.COM.AU>
Subject: deleting parts of a variable?
Hi folks,
At the risk of asking an embarassingly easy question, how do I delete a
word or a text item from a variable within AppleScript (1.1)?
In HyperCard, what I'd do is something like:
put "I don't eat snails. I prefer fast food." into theVar
[...]
delete word 7 of theVar
with the result of "I don't eat snails. I prefer food."
...but within AppleScript (using 'copy...to' instead of 'put...into' of
course) this produces this error:
word 7 of "I don't eat snails. I prefer fast food." doesn't understand the
delete message.
Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
tried other alternatives like using text items, using 'set word 3 of theVar
to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
driving me batty. Could some kind soul enlighten me so I can put the whole
experience behind me and get some sleep? :-)
TIA,
Paul.
--
_________________________________________________________________________
Paul Baily, Consulting SE | paulb@randomsa.com.au
| AppleLink: AUST0370
))/\ Random Access | CompuServe: 73320,667
\\\\Adelaide, South Australia |Where we're going, we don't *need* roads
=========================================================================
Date: Thu, 21 Apr 1994 11:26:47 +0000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jeremy Quinn <jermq@MEDIA.DEMON.CO.UK>
Subject: Hiding Apps from Frontier
Does anybody know how to hide an application from Frntier? I know it can be
done by getting Frontier to tell Quickeys to do the hiding, but I find this
technique inelegant, wasteful and risky!
I expected to find a command like Finder.hide(appID)/Finder.show(appID).
Thanks Jeremy Quinn
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jeremy Quinn : Internet:
3D/Interactive : jermq@media.demon.co.uk
Designer & : Phone:
Green Design Consultant : +44 71 737 6831
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Member of O2 Global Network : PGP Key on public keyservers
=========================================================================
Date: Thu, 21 Apr 1994 07:34:58 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
Subject: Re: MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
In-Reply-To: <199404210713.DAA04857@mbunix.mitre.org> from "Jon Pugh" at Apr
21, 94 00:11:55 am
>
> >Even stranger::
> >
> >If I take the script that I recorded, select it, copy it, paste it
> >into new script, then run the new script as an application, it works!
> >The original stil doesn't work.
> >
> >My thoughts are that for some reason, I can't run a "recorded" script.
> >Any ideas why that might be so? Is there any difference between a
> >"recorded" script and one that I just typed in directly?
> >
> >I'm so confused..
>
> This is a bug in AppleScript 1.0 that was fixed in 1.1 because I reported
> it and Warren fixed it. Isn't that special? ;)
>
But I'm running AppleScript 1.1. I still have the bug. Is there a
patch to fix this??
\marc
--
Marc N. Cannava | Tigers are nimble,
Technical Staff, The MITRE Corporation | And light on their toes,
Email: mnc@mitre.org | My RE-spect for tigers,
Phone: 617-271-2517 Fax: 617-271-2423 | Continually grows. --Hobbes
=========================================================================
Date: Thu, 21 Apr 1994 06:38:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: Can't get script to run!! Why?
>Help! This is driving me nuts!
>They say to go into the Script Editor, enter "RECORD" mode, and then
>fire up the Scriptable Text Editor, type some text, change the style.
>Then, stop recording.
>
>Now. I have a simple script that looks like this:
>
> tell application "Scriptable Text Editor"
> activate
> set selection to "Welcome to AppleScript"
> select word 3 of document 1
> set style of selection to italic
> end tell
>
>I save it as an Application called "My First Script", then I quit the
>editor. Both editors, in fact.
>
>Now. Whenever I double-click on the "My First Script" application, it
>brings up the title box, and I click on "Run". It then immediately
>quits, doing nothing.
You've run into a bug in AppleScript/Script Editor. Running recorded scripts
which are compiled for you during the record process does not always work.
The work around is to simply re-compile the script using the Script Editor.
Sad but true.
-Mark
=========================================================================
Date: Thu, 21 Apr 1994 10:59:09 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: K J Fox <kjfox@MKE.AB.COM>
Subject: Speech Macro Editor variables
Hi,
I'm exploring AppleScripting with a 660AV Mac and am writing speech
macros to do various things. One useful thing would be if the ability
is there to pass variables into the script from the recognized speech.
As an example, I wrote a script that "tells" hypercard to do a database
lookup of a project. The macro is called "lookup project XYZ". If my
database contains 2000 projects then I need 2000 speech macros unless I
can create a generic "lookup" macro where the second word is a parameter
that it can decipher into text.
Is anyone aware of this shortcoming and is there a way around this?
Are there any speech script additions that handle this sort of thing??
Ken
________________________________________________________________________
Kenneth J. Fox | E-mail: kjfox@mke.ab.com (pref)
Allen-Bradley Company | Phone: 414-382-3287 (V) 414-382-2742 (F)
Rockwell Int'l | Pager: 414-256-9702
Milwaukee, WI | Applelink: FOX.K
=========================================================================
Date: Thu, 21 Apr 1994 09:41:14 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: Hiding Apps from Frontier
In-Reply-To: <199404211040.DAA24842@mail.netcom.com> from "Jeremy Quinn" at
Apr 21, 94 11:26:47 am
>
> Does anybody know how to hide an application from Frntier? I know it can be
> done by getting Frontier to tell Quickeys to do the hiding, but I find this
> technique inelegant, wasteful and risky!
>
> I expected to find a command like Finder.hide(appID)/Finder.show(appID).
>
> Thanks Jeremy Quinn
>
There is a UCMD for Frontier called appMenu that gives you control over
the system's Application menu. With it installed, you can say:
appMenu.select ("Hide UserLand Frontier")
or select any other item in the menu. To hide a specific app, you need to
bring it to the front first, so that the Hide item will operate on it.
Doug Baron
=========================================================================
Date: Thu, 21 Apr 1994 09:45:43 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: "keyword" parameter in Frontier Script
In-Reply-To: <199404210757.AAA14024@mail.netcom.com> from "Jean-Michel Beuken"
at Apr 21, 94 09:53:57 am
>
>
> How is it possible to use the "keyword" parameter in Frontier Script ?
> Here above, You can see a piece of code to send a AppleEvent to Frontier.
> I create an script in 'system.verbs.traps.igor.test'
> All work perfectly ! Frontier receives the two parameters and the
> application receive well the returned parameter.
> But my question is : is it possible in Frontier to know the "keyword" (here
> 'typl' or 'typs') associated to the value ?
>
>
It's not possible to deterimine the keywords associated with parameters
to trap scripts. But the trap "script" itself can be a UCMD, in which
case your C code could extract the parameter keys.
Doug Baron
=========================================================================
Date: Thu, 21 Apr 1994 11:04:34 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: James Glidewell <jbg@SDC.CS.BOEING.COM>
Subject: Embedding QK scripts in AppleScript
I finally decided to get a copy of Quickeys 3.0 to
allow myself better control of various non-scriptable
apps that I use. In general, I have been quite happy
with QK and it does appear to fill a major gap in my
ability to use AS for some day to day tasks.
However...
I have not figured out a way to embed QK scripts inside
a AS script. The QK scripting docs give an example of how
to embed an AS script inside a QK script, but not vice-versa.
What I want to do is use AS as a looping construct and
invoke the QK script for each item (file, ...). It would be very
nice to be able to actually include the QK OSA script directly
in my AS script, rather than calling a named Quickkey. I really
don't want to define a lot of 1-shot QK scripts, all installed
separately, as this seems to be an organiztional nightmare.
Is there a way to mix & match OSA "dialects" in a single
script using the script editor?
Sorry if this has been hashed over many times before - I did
a careful study of the QK docs and my meager macscrpt archives
and could find nothing...
Thanks,
Jim Glidewell
jbg@sdc.cs.boeing.com
=========================================================================
Date: Thu, 21 Apr 1994 13:53:34 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Embedding QK scripts in AppleScript
In-Reply-To: Your message of "Thu, 21 Apr 94 11:04:34 PDT"
>I finally decided to get a copy of Quickeys 3.0 to
>allow myself better control of various non-scriptable
>apps that I use. In general, I have been quite happy
>with QK and it does appear to fill a major gap in my
>ability to use AS for some day to day tasks.
>
>However...
>
>I have not figured out a way to embed QK scripts inside
>a AS script. The QK scripting docs give an example of how
>to embed an AS script inside a QK script, but not vice-versa.
>
>What I want to do is use AS as a looping construct and
>invoke the QK script for each item (file, ...). It would be very
>nice to be able to actually include the QK OSA script directly
>in my AS script, rather than calling a named Quickkey. I really
>don't want to define a lot of 1-shot QK scripts, all installed
>separately, as this seems to be an organiztional nightmare.
>
>Is there a way to mix & match OSA "dialects" in a single
>script using the script editor?
>
You will need to use the run script command. The syntax is something like
run script <file ref | script string>
[with parameters <list>] [in <component name>]
After you have QuicKeys installed, open the Script Editor and select QuicKeys
from the OSA pop-up menu. Then perform the actions that you want to embed.
That'll get you the QuicKeys script.
To embed it in an AppleScript, you will need to do something like
run script "
[the quickeys script]
" in "QuicKeys"
You will also need to place a \ before all of the quotes in the QuicKeys
script. For instance,
Wait Application \"Adobe Photoshop 2.0.1\"
Otherwise, AppleScript gets very confused (<- a technical description of what
occurs). When you are recording your QuicKeys script, perform your actions
slowly and use keyboard commands whenever you can.
Sorry I can't be more specific, but I don't have a Mac handy at the moment.
This is in the next rev of the faq--which I'm hoping to upload tonight.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Thu, 21 Apr 1994 14:13:16 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: QuarkXPress scripts
I have uploaded a set of scripts for QuarkXPress to gaea. You'll find them in
ftp://gaea.kgs.ukans.edu/applescript/scripts/QuarkScripts.sit.hqx
These scripts were written by James Teters <JTeters@aol.com> and require
XPress, QuicKeys, and AppleScript. They have been saved as run only. There are
scripts that
-Find/Replace the color and shade of Text, Backgrounds, lines, and frames
individually.
-Create, delete, and copy guides.
-Change the background color, background shade, frame shade, frame width,
frame shade, line width, rotation, and other items with a single keystroke.
-Change the column count, runaround, vertical justification, and text
inset (with different values for the top, left, bottom and right insets) of a
text bo
x from a single dialog box.
There are 24 scripts in all and a scripting addition is included.
Enjoy.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry Cadence Design Systems pfterry@lks.csi.com +1 913 841 1283
=========================================================================
Date: Thu, 21 Apr 1994 14:33:05 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: mark stewart <mark_stewart@BIAD23.UTHSCSA.EDU>
Subject: comparing dates
comparing dates
Folks,
I'm developing a generic suite of scripts that work in conjunction with StepUp
Software's QuickAgent to script C.E. Software's QuickMail. I'm using Frontier
3.01.
The core script polls the contents of a user's mailbox and creates a table of
records, one record for each mail message. I would like to then be able to
filter messages on the basis of when they were received. Thus I am trying to
figure out how to compare dates to see which is more recent. Does anybody have
any good algorithms for doing this or know of a verb that I wasn't aware of
that handles it?
Mark Stewart
BIAD-Research Imaging Center
UTHSCSA
P.S. AppleScript solutions are equally welcome!
=========================================================================
Date: Thu, 21 Apr 1994 12:01:38 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: network_manager@ALDUS.COM
Organization: Aldus Corporation, Seattle, WA
Subject: NDN:Re: Embedding QK scripts in AppleScript
Your mail to the Microsoft Mail Server could not be fully
delivered! No Valid Addresses! It has been deleted.
Error List:
Bad 'To:' Address: david.rogers@MSM-Inter
=========================================================================
Date: Thu, 21 Apr 1994 15:50:09 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Doug Baron <userland@NETCOM.COM>
Subject: Re: comparing dates
In-Reply-To: <199404211932.MAA08278@netcom10.netcom.com> from "mark stewart"
at Apr 21, 94 02:33:05 pm
>
> comparing dates
> Folks,
> I'm developing a generic suite of scripts that work in conjunction with
StepUp
> Software's QuickAgent to script C.E. Software's QuickMail. I'm using Frontier
> 3.01.
> The core script polls the contents of a user's mailbox and creates a table of
> records, one record for each mail message. I would like to then be able to
> filter messages on the basis of when they were received. Thus I am trying to
> figure out how to compare dates to see which is more recent. Does anybody
have
> any good algorithms for doing this or know of a verb that I wasn't aware of
> that handles it?
>
>
Assuming that the dates are currently stored as strings and use
reasonable standard notation, all you need to do is coerce them to dates
and compare the date values. If d1 and d2 are both date strings, you can
compare them like this:
if date (d2) > date (d1)
msg (d2 + " is newer than " + d1)
No algorithms required!
Doug
=========================================================================
Date: Fri, 22 Apr 1994 08:32:29 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: renaming files with finder scripting
Hello,
I am using AppleScript 1.1 and the Finder Scripting Extension with System
7 pro to do some stuff. I want to duplicate a file and give it a name that
I want, not just the usually "Old Name copy". I thought the code below
would work but it doesn't work. The "set name of " does nothing. I still
have a duplicate file with the name "Old Name copy."
======
-- Does not work
tell application "Finder"
activate
set newFile to duplicate file "Old File" of folder "Some Folder" of
disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
set name of newFile to "junk"
end tell
=====
Here is the work-around that I came up with. This works. But why should I
have to do this ? Is there a more direct way to do what I want to do ?
Thanks !
=====
-- The work around
tell application "Finder"
activate
set newFile to duplicate file "Old File" of folder "Some Folder" of
disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
set selection to newFile
set name of selection to "junk"
end tell
======
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Fri, 22 Apr 1994 10:09:28 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: renaming files with finder scripting
In-Reply-To: <no.id> from "Herb Schilling" at Apr 22, 94 08:32:29 am
--Herb Schilling wrote:
>
> I am using AppleScript 1.1 and the Finder Scripting Extension with System
>7 pro to do some stuff. I want to duplicate a file and give it a name that
>I want, not just the usually "Old Name copy". I thought the code below
>would work but it doesn't work. The "set name of " does nothing. I still
>have a duplicate file with the name "Old Name copy."
>
>tell application "Finder"
> activate
> set newFile to duplicate file "Old File" of folder "Some Folder" of
>disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
> set name of newFile to "junk"
>end tell
Make this one simple change, and your life will become much easier:
add "replacing conflicts" to the end of your duplicate command. Without
this added on the end the duplicate command will leave you with the name
of the file selected in the Finder, instead of the actual file selected.
I know this sounds a bit confusing, but that's how the Finder works when
it duplicates a file. The work around that you come up with forced the
Finder to select the file, which allows you to then operate on it from
AppleScript.
-Hades
=========================================================================
Date: Fri, 22 Apr 1994 07:52:39 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Coercing into a reference.
Coercing into a reference.
I've got an interesting problem:
I'm processing a FileMaker Pro database with AppleScript. In it, I'm trying
to count the instances of each different answer in a field called 'product'.
It's not *that* difficult, since there's only 14 different products (and it's
not easy enough to be done through an FMPro script).
The way I have it done now is by defining 14 variables, with names that are,
conveniently, the contents of the product field. In other words, I have a
variable called "ADM" to store the number of records with "ADM" in the
product field, etc.
So I process each record in the file, and do a comparison. It looks
something like this:
if cell product is "ADM" then
set ADM to ADM + 1
else if cell product is "ADW" then
set ADW to ADW + 1
.....
else
set STW to STW + 1
end if
This is, to use a mild understatement, *SLOW*. Current rate is 2.1
records/second. I'd like to make it faster, and I'd love to just tell AS
"use whatever is in the product cell as a *variable name* to play with."
Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
Applescript), you can't coerce into a variable. Ideally, it would be
something like
set (cell product as variable) to (cell product as variable) + 1
but I don't think I can do that.
Suggestions? Comments? Sneering remarks about newbies? :)
-roy
=========================================================================
Date: Fri, 22 Apr 1994 11:21:53 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Coercing into a reference.
In-Reply-To: <no.id> from "Roy Rapoport" at Apr 22, 94 07:52:39 am
--Roy Rapoport wrote:
>
>So I process each record in the file, and do a comparison. It looks
>something like this:
>if cell product is "ADM" then
> set ADM to ADM + 1
>else if cell product is "ADW" then
> set ADW to ADW + 1
>.....
>else
> set STW to STW + 1
>end if
>
>This is, to use a mild understatement, *SLOW*. Current rate is 2.1
>records/second. I'd like to make it faster, and I'd love to just tell AS
>"use whatever is in the product cell as a *variable name* to play with."
>Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
>Applescript), you can't coerce into a variable. Ideally, it would be
>something like
>set (cell product as variable) to (cell product as variable) + 1
>but I don't think I can do that.
You've just hit one of the really large walls in AppleScript. This
kind of processing can only be done with multiple if statements. What
you can do to speed this up is get the contents of the field into a a
variable and then process the if statements on the variable. Calling the
get data function for each if statement is what is really slowing you
down.
Of course, this would all be a lot easier if AppleScript had a good
"case of" conditional like Frontier does.
-Hades
=========================================================================
Date: Fri, 22 Apr 1994 11:56:24 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Lee K. Hoong" <lhoong@EMORYU1.CC.EMORY.EDU>
Subject: Re: Coercing into a reference.
>Coercing into a reference.
>I've got an interesting problem:
>I'm processing a FileMaker Pro database with AppleScript. In it, I'm trying
>to count the instances of each different answer in a field called 'product'.
>It's not *that* difficult, since there's only 14 different products (and it's
>not easy enough to be done through an FMPro script).
>The way I have it done now is by defining 14 variables, with names that are,
>conveniently, the contents of the product field. In other words, I have a
>variable called "ADM" to store the number of records with "ADM" in the
>product field, etc.
>
>So I process each record in the file, and do a comparison. It looks
>something like this:
>if cell product is "ADM" then
> set ADM to ADM + 1
>else if cell product is "ADW" then
> set ADW to ADW + 1
>.....
>else
> set STW to STW + 1
>end if
>
>This is, to use a mild understatement, *SLOW*. Current rate is 2.1
>records/second. I'd like to make it faster, and I'd love to just tell AS
>"use whatever is in the product cell as a *variable name* to play with."
>Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
>Applescript), you can't coerce into a variable. Ideally, it would be
>something like
>set (cell product as variable) to (cell product as variable) + 1
>but I don't think I can do that.
>
>Suggestions? Comments? Sneering remarks about newbies? :)
It seems to me that you are taking a somewhat more complicated approach
than necessary. Can't you get FileMaker Pro to provide the same
information for you using its summary fields? This will be a more
straight-forward (and FASTER) approach than trying to get AppleScript to do
it.
Lee.
Lee K. Hoong
Dept. of Chemistry, Emory University
Internet: lhoong@unix.cc.emory.edu | America On-line: LHOONG
Disclaimer: I speak for myself only, not for Emory University
=========================================================================
Date: Fri, 22 Apr 1994 10:37:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Coercing into a reference.
At 07:52 4/22/94 +0000, Roy Rapoport wrote:
>I've got an interesting problem:
>I'm processing a FileMaker Pro database with AppleScript. In it, I'm trying
>to count the instances of each different answer in a field called 'product'.
>It's not *that* difficult, since there's only 14 different products (and it's
>not easy enough to be done through an FMPro script).
The suggestion to copy the cell into a variable before the cascaded if will
certainly help. If the database is not too big, you can proceed like this,
which should be faster still:
copy (field "foo" of database "bar") to theField -- maybe a specific
layout
repeat with x in theField
if x = "ADM" -- etc the if cascade as before
If the database is too big, the list that comes back from the get will
cause memory problems.
Now let's tackle the if cascade.
Suppose you define an AppleScript record:
set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
--AppleScript words or FileMaker words
something like
repeat with x in theField -- as before, theField is extracted as a list
-- from FileMaker
set item x of totals to item x of totals + 1
A try statement around that would be a good idea, to handle unknown field
contents. In fact, you could start out with an empty record, and let the
on error part of the try construct add items as new field contents are
encountered.
I haven't proven that the record idea will work, but it should. The get
field "foo" and the repeat with x in theField ideas have been demonstrated.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 22 Apr 1994 12:52:23 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Speech Manager
How can I let my Mac talk to me in AppleScripts?
Isn't there a command <<say "Hello, world">> or
something, or an OSAX to work with Speech Manager?
Jan.
Jan Dockx (Jan.Dockx@cs.kuleuven.ac.be)
K.U.Leuven; Department of Computer Science
Celestijnenlaan 200A / L00.10
3001 Heverlee
Belgium
tel.: ++ 32/16/20 10 15 x3596
----------------------------------------------
The EROOS Research Group can be contacted
through e-mail at:
eroos_contact@cs.kuleuven.ac.be
or through regular mail at:
Research Group Software Development Methods
K.U.Leuven; Department of Computer Science
Celestijnenlaan 200A
3001 Heverlee
Belgium
==============================================
Wisdom is not beauty ...
=========================================================================
Date: Fri, 22 Apr 1994 14:37:45 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John Schettino <js12@GTE.COM>
Subject: Re: Coercing into a reference.
>At 07:52 4/22/94 +0000, Roy Rapoport wrote:
>Now let's tackle the if cascade.
>
>Suppose you define an AppleScript record:
>
>set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
> --AppleScript words or FileMaker words
>
>something like
>
>repeat with x in theField -- as before, theField is extracted as a list
> -- from FileMaker
> set item x of totals to item x of totals + 1
>
>A try statement around that would be a good idea, to handle unknown field
>contents. In fact, you could start out with an empty record, and let the
>on error part of the try construct add items as new field contents are
>encountered.
>
>I haven't proven that the record idea will work, but it should. The get
>field "foo" and the repeat with x in theField ideas have been demonstrated.
Bzzt! Thank you for playing!
"Can't get item (item 1 of {\"ADM\", \"STW\", \"ADM\", \"STW\", \"ADM\",
\"STW\", \"STW\", \"STW\"}) of {ADM:0, STW:0}."
This was the test code:
set totals to {ADM:0, STW:0}
set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
try
repeat with x in theField -- as before, theField is extracted as a list
set item x of totals to (item x of totals) + 1
set totals's x to foo + 1
end repeat
on error str
str
end try
What we really need is a "contains" command that does a lookup of a string
in a list to return the OFFSET or ITEM number of the string in the list.
Does such a beast exist? if so then you could well code something like
this:
-- note: I'd like an osax for this function... any C programmers interested?
on listOffset(str, lst)
repeat with x from 1 to number of items in lst
if (str contains (item x of lst)) then
return x
end if
end repeat
return 0
end listOffset
-- here's some test code
set totals to {0, 0} -- how ever many are needed
set theFieldNames to {"ADM", "STW"} -- the actual values
-- our test data
set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
repeat with x in theField -- as before, theField is extracted as a list
set totalItem to listOffset(x, theFieldNames)
if (totalItem = 0) then error -- here we have a new field, we could
just extend our lists
set item totalItem of totals to (item totalItem of totals) + 1
end repeat
-- this just tests the results
totals -- prints {3,5} in result window as expected
- john
-----------------------------------------
js12@gte.com GTE Laboratories
John Schettino Waltham, MA
=========================================================================
Date: Fri, 22 Apr 1994 12:01:03 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Coercing into a reference.
At 07:52 4/22/94 +0000, Roy Rapoport wrote:
>Coercing into a reference.
>I've got an interesting problem:
>I'm processing a FileMaker Pro database with AppleScript. In it, I'm trying
>to count the instances of each different answer in a field called 'product'.
>It's not *that* difficult, since there's only 14 different products (and it's
>not easy enough to be done through an FMPro script).
>The way I have it done now is by defining 14 variables, with names that are,
>conveniently, the contents of the product field. In other words, I have a
>variable called "ADM" to store the number of records with "ADM" in the
>product field, etc.
In a prior response, I suggested that a record could be used to hold the
totals, rather than individual variables. I have not been able to convince
AppleScript to do what I want it to do. I guess that's what I get for
assuming that because something is easy in Frontier that it is likely to be
possible in AppleScript. I may yet have missed the magic which allows a
record to be used here. It's probably best to stick to the cascade of ifs,
which you already have working.
[Actually, in Frontier, I would use a table rather than a record, although
either would work.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 22 Apr 1994 14:28:17 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Coercing into a reference.
>>I said this:
>>Now let's tackle the if cascade.
>>
>>Suppose you define an AppleScript record:
>>
>>set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
>> --AppleScript words or FileMaker words
>>
>>something like
>>
>>repeat with x in theField -- as before, theField is extracted as a list
>> -- from FileMaker
>> set item x of totals to item x of totals + 1
>>
>>A try statement around that would be a good idea, to handle unknown field
>>contents. In fact, you could start out with an empty record, and let the
>>on error part of the try construct add items as new field contents are
>>encountered.
>>
>>I haven't proven that the record idea will work, but it should. The get
>>field "foo" and the repeat with x in theField ideas have been demonstrated.
And John Schettino correctly said
>Bzzt! Thank you for playing!
>
>"Can't get item (item 1 of {\"ADM\", \"STW\", \"ADM\", \"STW\", \"ADM\",
>\"STW\", \"STW\", \"STW\"}) of {ADM:0, STW:0}."
>
>This was the test code:
>set totals to {ADM:0, STW:0}
>set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
>
>try
> repeat with x in theField -- as before, theField is extracted as a
list
> set item x of totals to (item x of totals) + 1
> set totals's x to foo + 1
> end repeat
>on error str
> str
>end try
However, we can build something based on this pattern:
(* counts is a list of records. Each record is of the form
xname: some string
xcount: an integer
*)
set counts to {}
set test to {"foo", "bar", "foo", "baz", "foo"}
repeat with x in test
increment(x as string)
end repeat
on increment(aName) -- increment the count for record named name in counts
global counts
repeat with x in counts -- could/should use a binary search here
if xname of x = aName then
set xcount of x to (xcount of x) + 1
return xcount of x
end if
end repeat
set counts to counts & {{xname:aName, xcount:1}}
return 1
end increment
counts
The above test puts the following into the result window of the AppleScript
Script Editor:
{{xname:"foo", xcount:3}, {xname:"bar", xcount:1}, {xname:"baz", xcount:1}}
Testing would have to establish at what point a binary search might become
desirable in the counts list, remembering that building the list then
becomes slower. I suspect that a linear search is better until the list
becomes quite large.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 22 Apr 1994 16:57:01 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Igor Livshits <igorl@UIUC.EDU>
Subject: Clipboard juggling
Howdy,
I am trying to use MenuEvents and Jon's Commands in tandem to copy selected
text within an active window to the clipboard. Then, I place the contents
of the clipboard into a string variable and pass it as an argument to a
command directed to another application.
The text definitely gets copied, but the application does not put the
contents into the system scrap, rather it keep is locally. I thought that
actiavting/deactivating between two apps would force the first application
to set system scrap to its local scrap as it surrenders its foreground
status, but is not the case.
Here's what happens:
1. The script runs, and the copy is performed via MenuEvents in app1
2. App2 is activated, but the clipboard contains old system scrap data
3. If I manually bring app1 to the foreground and then manually bring app2
to the foreground (no other actions in between), the system scrap will
contain new data.
Because of this, I cannot use Jon's Commands' the clipboard OSAX as it
seems to work with system scrap only. Forcing several iterations of
activate app1, activate app2 does not help at all.
So, is there a way to force an application to update system scrap?
Below are two AS handlers that do the work:
--
on CopiedSelection()
global menuID, itemID, hostApplication, selectedURL
try
tell application hostApplication
activate
Select Menu Item menu id menuID menu item id itemID -- copy the URL
to the clipboard
set selectedURL to (the clipboard as string) -- make local copy of
the selection
return true
end tell
on error
return false
end try
end CopiedSelection
--
on FetchSelection()
global selectedURL
try
tell application "Anarchie"
activate
--fetch url selectedURL
end tell
on error errorString number errorNumber
-- better error handling under construction
error errorString number errorNumber
end try
end FetchSelection
--
I'll send the full script to anyone interested.
Thanks for your help, Igor
_____
NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424; Have a Coke and a smile :)
=========================================================================
Date: Fri, 22 Apr 1994 16:33:24 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Converting to Uppercase
Converting to Uppercase
Is there any function in applescript that converts letters/words to capital
letters? something like,
copy capitalize string to string2
so if string is "string", string2 would be "STRING"...
-roy
=========================================================================
Date: Fri, 22 Apr 1994 20:06:20 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: 2 simple (?) questions
2 simple (?) questions
Firstly, I need to tell AS to show all records in an FMPro Dbase whose field
product is equal to something. I was using something like this:
show (every record whose field product is "ADM")
The problem is that this catches both field product "ADM" and field product
"ADMB". Is there any way to tell it I want an exact match? I tried using
'exactly' :)
I think I've just forgotten the second question. Nevermind ... :)
-roy
=========================================================================
Date: Sat, 23 Apr 1994 14:23:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: Speech Manager
> How can I let my Mac talk to me in AppleScripts?
> Isn't there a command <<say "Hello, world">> or
> something, or an OSAX to work with Speech Manager?
Try the speak command in Script Tools 1.3 or later.
Cheers
-Mark
=========================================================================
Date: Thu, 21 Jul 1994 18:17:23 +1100
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
Subject: Looking for Eudora Scripts
Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
some intelligent things with my mail - eg if it's from a listServ address
automatically file it in the appropriate mail-box.
Any ideas?
Cheers,
Michael Norris,
CAL Consultant,
University of Otago,
PO Box 56,
Dunedin,
New Zealand.
---------------------
Ph:(03) 479-7705
E-Mail: michael.norris@stonebow.otago.ac.nz
=========================================================================
Date: Mon, 25 Apr 1994 04:49:21 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
Subject: Scriptable Finger app or osax
Hi,
Does anyone out there know of a scriptable finger application or
OSAX? I'd like to be able to finger someone through a script, preferrably
through an OSAX, but I'll take whatever I can get.
Baring a pre-made solution, does anyone know where I can get source
code in C to such an application? Peter Lewis's excellent app "Finger"
unfortunately does not currently support scripting, and was written in
Pascal so I can't even hack his code. (I don't have a Pascal compiler)
Thanks,
Sam
=========================================================================
Date: Mon, 25 Apr 1994 12:11:51 +0000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jeremy Quinn <jermq@MEDIA.DEMON.CO.UK>
Subject: Menu Events
I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
I am having some problems using the files in the archive.
The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
The (AppleScript) sample script will not pass the syntax check.
I can't really work out how to use any of it.
Has anyone got any sample scripts for Frontier?
Thanks Jeremy
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jeremy Quinn : Internet:
3D/Interactive : jermq@media.demon.co.uk
Designer & : Phone:
Green Design Consultant : +44 71 737 6831
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Member of O2 Global Network : PGP Key on public keyservers
=========================================================================
Date: Mon, 25 Apr 1994 09:07:38 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Looking for Eudora Scripts
>Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
>some intelligent things with my mail - eg if it's from a listServ address
>automatically file it in the appropriate mail-box.
Hello,
I just started using Eudora because of its scriptability. I love it!
Here is a quick script for sorting mail. I've edited it a bit for clarity
(and shortened some variable names so they'd fit in 80 columns!). This is a
rough script - it has not been refined and isn't necessarily very well
written, but it does its job very nicely. I use more if routines for sorting
the mail than you see here.
"Messenger 1.5.9" is an AppleTalk network communications app that I wrote.
Besides communicating, I use it to notify me about a lot of things (I have
a folder-watching AppleScript that notifies me through Messenger). It is
scriptable (obviously!). It's free and available on Info-Mac's archives,
UMich and everywhere fine freeware is distributed!
-DM
on idle
if "Eudora1.4.2" is in ((list applications) as string) then
try
tell application "Eudora1.4.2"
with timeout of 1200 seconds
set prevNoOfMsgs to number of message
of
mailbox "In" of mail folder ""
connect
set currNoOfMsgs to number of message
of
mailbox "In" of mail folder ""
set theMessages to ""
if prevNoOfMsgs =82 currNoOfMsgs then
set alertMessenger to true
set x to prevNoOfMsgs + 1
repeat (currNoOfMsgs -
prevNoOfM
sgs) times
set sndr to field
"From"
of message x of mailbox "In" of mail folder =
""
set recip to field "To"
of message x of mailbox "In" of mail folder "=
"
set sbjct to Subject of
message x of mailbox "In" of mail folder ""
set theMessages to
theMe
ssages & sndr & return & sbjct
set x to x + 1
if sndr contains
"mulle"
then
set x to x - 1
move message x
o
f mailbox "In" of mail folder "" InsertHere end of
mailbox "MullNet" of mail folder ""
end if
if recip contains
"MACSC
RPT" then
set x to x - 1
move message x
o
f mailbox "In" of mail folder "" InsertHere end of
mailbox "AppleScript" of mail folder ""
end if
end repeat
else
set alertMessenger to false
end if
end timeout
end tell
=09
if alertMessenger is true then
tell application "Messenger 1.5.9"
copy "*:**New Mail**" to variable
"theSe
nder"
copy return & theMessages & "**END**"
to
variable "theData"
copy "Message" to variable
"theDataType"
do script "receiveTheEvent"
end tell
end if
on error
end try
end if
return 120 -- Idle time in seconds
end idle
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Mon, 25 Apr 1994 10:44:55 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Herb Schilling <hschilling@LERC.NASA.GOV>
Subject: Re: renaming files with finder scripting
>--Herb Schilling wrote:
>>
>> I am using AppleScript 1.1 and the Finder Scripting Extension with System
>>7 pro to do some stuff. I want to duplicate a file and give it a name that
>>I want, not just the usually "Old Name copy". I thought the code below
>>would work but it doesn't work. The "set name of " does nothing. I still
>>have a duplicate file with the name "Old Name copy."
>>
>>tell application "Finder"
>> activate
>> set newFile to duplicate file "Old File" of folder "Some Folder" of
>>disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
>> set name of newFile to "junk"
>>end tell
>
> Make this one simple change, and your life will become much easier:
>add "replacing conflicts" to the end of your duplicate command. Without
>this added on the end the duplicate command will leave you with the name
>of the file selected in the Finder, instead of the actual file selected.
>I know this sounds a bit confusing, but that's how the Finder works when
>it duplicates a file. The work around that you come up with forced the
>Finder to select the file, which allows you to then operate on it from
>AppleScript.
>
At first I wrote a simple script that made use of your suggestion and
everything worked fine. Now that I put this suggestion into my larger
script, I have the same problem as before! I have to do the selection
work-around to make it work again. Got me what is going on.
--
Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
sshws@convx1.lerc.nasa.gov
AppleLink: SCHILLING.H
=========================================================================
Date: Mon, 25 Apr 1994 13:21:25 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Scriptable Finger app or osax
>Hi,
>
> Does anyone out there know of a scriptable finger application or
>OSAX? I'd like to be able to finger someone through a script, preferrably
>through an OSAX, but I'll take whatever I can get.
>
> Baring a pre-made solution, does anyone know where I can get source
>code in C to such an application? Peter Lewis's excellent app "Finger"
>unfortunately does not currently support scripting, and was written in
>Pascal so I can't even hack his code. (I don't have a Pascal compiler)
>
> Thanks,
> Sam
Hi, contact Atul Butte. Following is the text of his TCP/IP Scripting
Addition OSAX beta test distribution.
-DM
Subject: TCP/IP Scripting Addition
My Legal Department finally approved the distribution, so...
The next message you receive from me will be a 74 kilobyte BinHex encoded
self-enclosed archive (an application that you can open). Enclose in the
archive are the TCP/IP Scripting Addition (version 1.0b1), a first draft of
the instructions, and five sample scripts. These are:
1. Drag and Drop FTP -- Drag files on it and it will FTP them to a host
2. Finger -- Tell it who and where to look for someone and it will Finger them
3. Get Weather -- What's the weather like in Washington DC? (via Gopher)
4. Gopher Server -- Makes text files available over Gopher
5. Send Mail -- Sends a simple mail message using SMTP
These sample scripts are described in a READ ME file (also enclosed in the
archive).
PLEASE NOTE: This 1.0b1 version of the Scripting Addition EXPIRES on May
1, 1994. By then, you will have received a better version. This is to
prevent people from continuing to use the older versions when newer ones
are available.
Please test the scripting addition on as many platforms as possible
(PowerBook, Power PC, A/UX, System 7.5, InterSLIP and MacSLIP). Of course,
I would like to hear about any bugs you find, but I am also interested in
hearing how you are using these scripts and whether they work for you. Let
me know if you would like to see additional commands in this suite. I also
would like to get comments about the first-draft instructions. I plan to
fix any bugs that you find and ideally release this scripting addition in
April.
If you come up with interesting scripts and you with to share them, please
post them on comp.sys.mac.programmer, comp.sys.mac.comm, or better yet on
the AppleScript mailing list. I would love to see scripts combining
FileMaker and Gopher Server, or NetNews and MacWrite Pro, etc. It is VERY
easy to use this scripting addition to facilitate ANY Internet
client-server interactions.
Many of you contacted me about using the scripting addition to help with
tasks in your company, as part of in-house products, as part of free
products, and as part of commercial products. I am working on a licensing
plan that will start after the beta period is over. If you have not
already, please let me know if you are interested in licensing the
scripting addition for one of these purposes. For those of you who have
already, I will be sending you more information.
Thanks again for your interest!
-- Atul Butte
P.S. Please send mail to this address, as it will last longer than my NIH
address...
----------------------------------------------------------------------
Atul Butte
atul_butte@brown.edu
currently at
Howard Hughes Medical Institute / National Institutes of Health
atul_butte@nih.gov
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Mon, 25 Apr 1994 15:36:24 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Scripting InterSLIP???
I could have sworn that not too long ago I saw some messages on this list
regarding scripting InterSLIP. However, I tried dragging every part of
InterSLIP (control panel, extension and DA) onto the script editor and none
have a dictionary. Am I mistaken? If not, how do I script it?
Also, on a related note, is there any way to have a "shutdown script"?
Something that gets run after a shutdown (actually, after all applications
excepting the Finder are quit from a shutdown). I would like to make
simple script that automatically disconnects the InterSLIP connection after
a shutdown.
Are either of the commercial SLIP products (MacSLIP or VersaTerm SLIP)
scriptable or offer such a feature built in?
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Mon, 25 Apr 1994 15:51:35 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Drew Phillips <drew@MAIL.COX.SMU.EDU>
Subject: ScriptRunner
Has anyone used this at all. It seems pretty steep for shareware ($66 I
think). I was just curious if the full version was much better than the
demo version.
Thanks
DRew
------------------------------------------------------------------------
Drew Phillips -- ISS | I'm going to be -- The Sledgehammer |
Cox School of Business | This can be my testimony |
Meadows School of the Arts | I'm your Sledgehammer |
Southern Methodist University | Let there be no doubt about it |
drew@mail.cox.smu.edu |---------------------------------------|
=========================================================================
Date: Mon, 25 Apr 1994 16:15:03 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: Looking for Eudora scripts (re-post)
Eudora can display tabs as spaces, but apparently it sent my sorting script
with tabs intact, so it doesn't display very nicely in some folks's eemail
applications.
Here's the message again with a single space in place of each tab:
-DM
>Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
>some intelligent things with my mail - eg if it's from a listServ address
>automatically file it in the appropriate mail-box.
Hello,
I just started using Eudora because of its scriptability. I love it!
Here is a quick script for sorting mail. I've edited it a bit for clarity
(and shortened some variable names so they'd fit in 80 columns!). This is a
rough script - it has not been refined and isn't necessarily very well
written, but it does its job very nicely. I use more if routines for sorting
the mail than you see here.
"Messenger 1.5.9" is an AppleTalk network communications app that I wrote.
Besides communicating, I use it to notify me about a lot of things (I have
a folder-watching AppleScript that notifies me through Messenger). It is
scriptable (obviously!). It's free and available on Info-Mac's archives,
UMich and everywhere fine freeware is distributed!
-DM
on idle
if "Eudora1.4.2" is in ((list applications) as string) then
try
tell application "Eudora1.4.2"
with timeout of 1200 seconds
set prevNoOfMsgs to number of message of mailbox "In" of mail folder ""
connect
set currNoOfMsgs to number of message of mailbox "In" of mail folder ""
set theMessages to ""
if prevNoOfMsgs =82 currNoOfMsgs then
set alertMessenger to true
set x to prevNoOfMsgs + 1
repeat (currNoOfMsgs - prevNoOfMsgs) times
set sndr to field "From" of message x of mailbox "In" of mail folder =
""
set recip to field "To" of message x of mailbox "In" of mail folder "=
"
set sbjct to Subject of message x of mailbox "In" of mail folder ""
set theMessages to theMessages & sndr & return & sbjct
set x to x + 1
if sndr contains "mulle" then
set x to x - 1
move message x of mailbox "In" of mail folder "" InsertHere end of
mailbox "MullNet" of mail folder ""
end if
if recip contains "MACSCRPT" then
set x to x - 1
move message x of mailbox "In" of mail folder "" InsertHere end of
mailbox "AppleScript" of mail folder ""
end if
end repeat
else
set alertMessenger to false
end if
end timeout
end tell
if alertMessenger is true then
tell application "Messenger 1.5.9"
copy "*:**New Mail**" to variable "theSender"
copy return & theMessages & "**END**" to variable "theData"
copy "Message" to variable "theDataType"
do script "receiveTheEvent"
end tell
end if
on error
end try
end if
return 120 -- Idle time in seconds
end idle
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Mon, 25 Apr 1994 14:18:39 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: Scripting InterSLIP???
>I could have sworn that not too long ago I saw some messages on this list
>regarding scripting InterSLIP. However, I tried dragging every part of
>InterSLIP (control panel, extension and DA) onto the script editor and none
>have a dictionary. Am I mistaken? If not, how do I script it?
Here is my "InterSLIP Autodialer" script. It requires the scriptable
app "InterSLIP AE" which is available on ftp.netcom.com/leonardr, as well
as the "AutoType" osax from gaea.
-Dave
global i
set i to 1
on idle
if i = 1 then
tell application "Finder Liaison 1.1"
--note: you will have to add your own path below
Open (a reference to File "Mac:Comm:TCP
Tools:InterSLIP Setup")
quit
end tell
set i to i + 1
else if i = 2 then
tell application "InterSLIP/AE"
set status to (Get Status ID)
end tell
if status = 0 then
AutoType "m" holding "control"
else if status = 4 then
set i to i + 1
end if
else if i > 2 then
set i to i + 1
end if
if i = 5 then
--tell application "InterSLIP/AE" to quit
quit
end if
return 2
end idle
------------------------------------------------------------------------------
David Ray Dream Designs Music Composition
daver@netcom.com PO Box 5631 Interactive Multimedia
510-527-9010 Berkeley CA 94705 Virtual Worlds
=========================================================================
Date: Tue, 26 Apr 1994 09:31:56 +0930
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
Subject: Coercing into a reference (dead & buried already?)
People,
Sorry if this occurs after the discussion is dead and buried, but we just
had a long weekend here in Australia (ANZAC Day), and I'm a little bit
behind.
On Fri, 22 Apr 1994 07:52:39 Roy Rapoport wrote :
>I've got an interesting problem:
>I'm processing a FileMaker Pro database with AppleScript. In it, I'm trying
>to count the instances of each different answer in a field called 'product'.
>It's not *that* difficult, since there's only 14 different products (and it's
>not easy enough to be done through an FMPro script).
And he titled it "Coercing into a reference." He went on to say that his
solution worked OK but that it was...
>This is, to use a mild understatement, *SLOW*. Current rate is 2.1
>records/second. I'd like to make it faster...
>
>Suggestions? Comments? Sneering remarks about newbies? :)
Well, I STILL classify myself as a "newby", so here goes...
I got AS 1.1 bundled with HyperCard 2.2, and LO! there is an example stack
called "Applescript Library" upon which I have based ALL my AS to date
using FileMakerPro. In this stack are TWO examples of controlling FMPro,
one which simply returns all the field names in an FMPro database, and the
other which (and I quote) :
"This script builds a list of all unique values for a particular field, and
the number of records that have each value, for FileMaker Pro's active
database."
I have not timed the code, so it may be even more horrifically slow than
what you've already got, but it does work (at least from HC).
The *major* delays are still in the OS, as simple searches in FMPro are
almost instantaneous, yet via AS from HC can take 20 seconds or more!
Trying to improve the speed of your "counting" code probably won't help
much, as the bottleneck seems to occur in moving from record to record in
FMPro via AS. For me to just move to the next record can take up to 5
seconds! [I'm open to being shot down in flames if I've reported incorrect
stuff here, but I am still a beginner.]
Hope its not too late, and that this helps somewhat.
Best --
Paul J. Stoll
Computer Systems Officer
Computer Assisted Learning Unit
Flinders University of South Australia
Flinders Medical Centre
Bedford Park. 5042.
South Australia.
Ph. : (08) 204 4163
Fax : (08) 277 0085
=========================================================================
Date: Tue, 26 Apr 1994 09:39:16 +0930
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Paul Baily <paulb@RANDOMSA.COM.AU>
Subject: [Repost] deleting parts of a variable?
Hi folks,
[Apologies if this is the second time you've read this, the first time I
posted it, the only response I got was a deafening silence so I'm not even
sure the message got out.]
At the risk of asking an embarassingly easy question, how do I delete a
word or a text item from a variable within AppleScript (1.1)?
In HyperCard, what I'd do is something like:
put "I don't eat snails. I prefer fast food." into theVar
[...]
delete word 7 of theVar
with the result of "I don't eat snails. I prefer food."
...but within AppleScript (using 'copy...to' instead of 'put...into' of
course) this produces this error:
word 7 of "I don't eat snails. I prefer fast food." doesn't understand the
delete message.
Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
tried other alternatives like using text items, using 'set word 7 of theVar
to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
driving me batty. Could some kind soul enlighten me so I can put the whole
experience behind me and get some sleep? :-)
Thanks in advance,
Paul.
--
_________________________________________________________________________
Paul Baily, Consulting SE | paulb@randomsa.com.au
| AppleLink: AUST0370
))/\ Random Access | CompuServe: 73320,667
\\\\Adelaide, South Australia |Where we're going, we don't *need* roads
=========================================================================
Date: Tue, 26 Apr 1994 08:33:23 CDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Havens - SMM <havens@ASTRO.SPA.UMN.EDU>
Subject: What Apps are running
In-Reply-To: <9404260936.AA19714@ast1.spa.umn.edu>; from "Automatic digest
processor" at Apr 26, 94 12:00 am
Can anyone tell me a method for determining what applications are running?
I need to close all apps before running a reset script I've written.
Any help would be appreciated.
-- Courtney Ann Nieman
-- Computer Instructor
-- Science Musuem of Minnesota
-- (612) 221-9462
-- havens@ast1.spa.umn.edu
=========================================================================
Date: Tue, 26 Apr 1994 09:49:16 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Test - Anyone have success turning off "acknowlegements" -
NOACK??
Has anyone tried and successfully sent the SET MACSCRPT NOACK command to
the list server and had it stick? It keeps turning ACK back on for some
reason....
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Tue, 26 Apr 1994 10:52:15 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Test - Anyone have success turning off "acknowlegements" -
NOACK??
In-Reply-To: <no.id> from "Stephen Jonke" at Apr 26, 94 09:49:16 am
--Stephen Jonke wrote:
>
>Has anyone tried and successfully sent the SET MACSCRPT NOACK command to
>the list server and had it stick? It keeps turning ACK back on for some
>reason....
Well, it certainly doesn't do that for me. I have my options set to
MAIL, NOACK and REPRO just like I do for all of the listservs that I'm
on. Have you tried to unsubscribe, and the re-subscribe?
-Hades
=========================================================================
Date: Tue, 26 Apr 1994 08:19:49 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Getting Index
Getting Index
There's a way to get the list of different values in a FileMaker Pro database
(Edit, Paste Special, Paste from Index). Does anyone know how to get that
index from FMPro with AppleScript?
-roy
=========================================================================
Date: Tue, 26 Apr 1994 13:23:19 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John Schettino <js12@GTE.COM>
Subject: Re: [Repost] deleting parts of a variable?
paulb@randomsa.com.au wrote:
>Hi folks,
>At the risk of asking an embarassingly easy question, how do I delete a
>word or a text item from a variable within AppleScript (1.1)?
>
>In HyperCard, what I'd do is something like:
>
> put "I don't eat snails. I prefer fast food." into theVar
>[...]
> delete word 7 of theVar
>
>with the result of "I don't eat snails. I prefer food."
>
>...but within AppleScript (using 'copy...to' instead of 'put...into' of
>course) this produces this error:
>
>word 7 of "I don't eat snails. I prefer fast food." doesn't understand the
>delete message.
>
>Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
>tried other alternatives like using text items, using 'set word 7 of theVar
>to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
>driving me batty. Could some kind soul enlighten me so I can put the whole
>experience behind me and get some sleep? :-)
>
Paul (and others)
repeat after me... AppleScript is not HyperTalk....
Alas, in the AS language guide, you will find that strings or text are
read-only objects. You cannot modify directly any string using anything
other than set or copy. For your example, you could do the following:
set theVar to "I don't eat snails. I prefer fast food."
-- delete word 7
set theVar to text from word 1 to word 6 of theVar & " " & text from word 8
to word (number of words in theVar) of theVar
That's the best you can do with AS1.1.
- john
-----------------------------------------
js12@gte.com GTE Laboratories
John Schettino Waltham, MA
=========================================================================
Date: Tue, 26 Apr 1994 14:38:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: Menu Events
Jeremy Quinn writes:
>I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
>
>I am having some problems using the files in the archive.
>
>The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
>aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
>
>The (AppleScript) sample script will not pass the syntax check.
>
>I can't really work out how to use any of it.
>Has anyone got any sample scripts for Frontier?
Menu Events Scripting Addition does not implement an 'osax' handler.
It is only a dictionary ('aete'). The basic Apple Script Editor uses
any 'aete' resources it finds in the Scripting Additions folder to
syntax-check its scripts. Not being a Frontier user, I can't comment
on how things would be different in that environment.
The actual code to support Menu events is a separate system extension,
so that it can work in the absence of any scripting system.
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Tue, 26 Apr 1994 13:25:45 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Menu Events
Jeremy Quinn sez...
>I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
>
>I am having some problems using the files in the archive.
>
>The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
>aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
>
>The (AppleScript) sample script will not pass the syntax check.
>
>I can't really work out how to use any of it.
>Has anyone got any sample scripts for Frontier?
I hadn't cared about Menu Events, so I hadn't looked at it. However, given
the explanation that Ross has provided, it would appear that:
1. Something (presumably a faceless background app) is likely running, and
has some System handlers installed to catch events (alternatively, it
accepts events directed to its process based on signature).
2. These events are described in the aete in "Menu Events Scripting Addition".
3. It is likely that the 'aete' parser which is part of the Commercial
Developers Suite (shipped with Frontier 3.x) can probably be induced to
write the glue needed to connect Frontier with the Menu Events extension
thing. I would have to research how, but that would be the place to look.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Tue, 26 Apr 1994 16:52:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: Menu Events
John W. Baxter writes:
>I hadn't cared about Menu Events, so I hadn't looked at it. However, given
>the explanation that Ross has provided, it would appear that:
>
>1. Something (presumably a faceless background app) is likely running, and
>has some System handlers installed to catch events (alternatively, it
>accepts events directed to its process based on signature).
The Menu Events system extension adds a system Apple event handler which
catches events sent to any high-level-event-aware application (unless that
application has bound an obnoxious total-wildcard handler over everything,
prime example being Microsoft Word). There's no FBA involved. It also
patches the menu selection trap to enable script recording of real menu
selections, but that's beside the point we're discussing.
>2. These events are described in the aete in "Menu Events Scripting
Addition".
Yes.
>3. It is likely that the 'aete' parser which is part of the Commercial
>Developers Suite (shipped with Frontier 3.x) can probably be induced to
>write the glue needed to connect Frontier with the Menu Events extension
>thing. I would have to research how, but that would be the place to look.
Can't say, but I'm sure you can manage it, John! :-)
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Wed, 27 Apr 1994 11:20:27 +1000
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Bradshaw <mbradsh@EXTRO.UCC.SU.OZ.AU>
Subject: AppleScript problem
I'm having a frustrating experience trying to use AppleScript to script
programs over a network, and I would appreciate any help.
The problem I'm getting is in simply trying to activate a remote
application.
Whenever I send an activate command to a valid file path and node name, I
get an error -919. I've checked all settings and I'm sure everything
required is correct: program linking is switched on in the remote
application, there is only one zone so no zone specifier is needed, both
sender and target machine are running AppleScript 1.1 under System 7.1.
A clue to the problem is in the result returned from the following script:
------------------------------------------------------------------------
set applicationName to "Happy HD:Word Processing:Microsoft Word
5.1a:Microsoft Word" -- no word wrap in actual script
set machineName to "Library IIvx"
try
activate application applicationName of machine machineName
on error errMsg number errNum from suspect
display dialog errMsg & return & errNum buttons {"OK"}
get suspect
end try
-----------------------------------------------------------------------
The Result:
application "Happy HD:Word Processing:Microsof
machine "Library IIvx"
Notice that the "Microsoft Word 5.1a" part has been slightly scrambled.
A similar thing happens with other applications, EG
The Result:
application "Happy HD:Data Management:Claris F
Pro" of machine "Library IIvx"
where "Claris Filemaker Pro" has become "Claris F=aker Pro"
The same error message occurs if the names are specified directly without
variables. I have no idea why the application name has been scrambled and
the whole problem has me baffled. I would greatly appreciate any assistance.
Michael Bradshaw
mbradsh@ucc.su.oz.au
=========================================================================
Date: Wed, 27 Apr 1994 00:20:51 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: AppleScript is not HyperTalk...
>repeat after me... AppleScript is not HyperTalk....
Good thing too. HyperTalk has a different set of problems. Like a really
lame compiler. ;)_
>>...but within AppleScript (using 'copy...to' instead of 'put...into' of
>>course) this produces this error:
However, in deference to Hypercard, AppleScript 1.1 allows you to use
"put...into". It just changes it to "copy...to" when you compile.
Jon
Sometimes you feel like a .sig, sometimes you don't.
=========================================================================
Date: Wed, 27 Apr 1994 03:34:12 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Aaron Mansheim <mansheim@CSUGRAD.CS.VT.EDU>
Subject: AS interpreter?
I wonder whether anyone is working on a command line interface for
the Mac built on AppleScript. It might be slow, but doesn't seem utterly
difficult to do. I would enjoy being able to use my Mac remotely over a
vt100 emulation or worse. Besides, it would be fun to try editing text files
interactively using AppleScript commands. On the other hand, the command
interpreter would have to be sure to catch run-time errors whenever
possible.
Since many users of this list know more about Mac programming than I do
(I've been hoping to sublimate my desire to learn real Mac programming by
AppleScripting) I'd like to ask them:
1) I believe the Communications Toolbox can be used to provide terminal
I/O to a program whether the program is used locally or remotely.
Is that correct?
If not, the discussion on the alt.mac.os list has confused me.
I was unable connect a session of Microphone LT to a session of a copy
of Microphone LT, but that doesn't prove anything. In a few minutes I'll
try Termy.
2) A more iffy proposition:
Supposing that one had an AppleScript-based command interpreter
responding to a connection through the CTB, could the interpreter
send the remote user through the usual AppleTalk log-in process?
Could the remote user be fit into the AppleTalk Users & Groups scheme?
=========================================================================
Date: Wed, 27 Apr 1994 06:57:34 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
Subject: Re: AS interpreter?
At 3:34 AM 4/27/94 -0400, Aaron Mansheim wrote:
> I wonder whether anyone is working on a command line interface for
>the Mac built on AppleScript. It might be slow, but doesn't seem utterly
>difficult to do. I would enjoy being able to use my Mac remotely over a
>vt100 emulation or worse. Besides, it would be fun to try editing text files
>interactively using AppleScript commands. On the other hand, the command
>interpreter would have to be sure to catch run-time errors whenever
>possible.
Check out Script Daemon, by Peter Lewis, if you have MacTCP. Script Daemon
allows you to telnet to your Mac and enter AppleScript commands. Only the
owner can log in (using the Owner name&password).
Bob
--
Bob Snyder N2KGO MIME, RIPEM mail accepted
snyderra@dunx1.ocs.drexel.edu finger for RIPEM public key
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
=========================================================================
Date: Wed, 27 Apr 1994 08:17:06 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: King Rhoton <king@ACPUB.DUKE.EDU>
Subject: Re: AS interpreter?
> I wonder whether anyone is working on a command line interface for
>the Mac built on AppleScript. It might be slow, but doesn't seem utterly
>difficult to do. I would enjoy being able to use my Mac remotely over a
>vt100 emulation or worse. Besides, it would be fun to try editing text files
>interactively using AppleScript commands. On the other hand, the command
>interpreter would have to be sure to catch run-time errors whenever
>possible.
Well, if you've got MacTCP, I believe what you ask has already been done by
Peter Lewis. Grab yourself a copy of ScriptDaemon, and slap it into your
Startup Items folder. With MacTCP installed, it allows you to telnet into
your Mac, login (based on users and groups), and enter applescript commands
at a command prompt (the applesoft prompt--I got a good chuckle at that).
Even multi-line commands (scripts) are supported.
King Rhoton king@acpub.duke.edu
=========================================================================
Date: Wed, 27 Apr 1994 08:25:53 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
Subject: Eudora & HyperCard
Tom,
We've got a check made out to you in the amount of $300, all ready to send
when we finish this little project. How's it coming?
*********************************************************************
Dr. Frank Lowney, Director, Regional Teacher Education Center
System Administrator, The GC EduNET Project
CBX 034, School of Education
Georgia College, Milledgeville, GA 31061-0490
Voice: (912) 453-5121
via GC EduNET, Georgia's Statewide K-12 Education Network, telnet to:
gcedunet.peachnet.edu
*********************************************************************
=========================================================================
Date: Wed, 27 Apr 1994 12:54:27 GMT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Robert K. Terra" <Robert_Terra@BROWN.EDU>
Organization: Brown University
Subject: Omitting a small list from a larger list
Hi All,
I have a list of folders, say 50 folders. I want to copy something to all
but 3 of those folders. Is there any way, besides using nested "if-then's"
(in case 3 folders grows to 10 folders, I don't want to use 10 nested
if-then's) to accomplish this. I've tried using a variety(?) of "Repeat"
loops but can't get it the right way. What I want to do is:
for the first folder
(of
the 50)
compare it to all of the folders in the list of
3
folders
if they are equal (or contains,
etc
) then don't copy
something
to that folder
move on to the second folder (of the 50)
This works, but I'm having trouble inserting another repeat loop and still
only going through the 'big' list once:
set userVolume to "Admission.Users:"
set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
"Admission.Users:SUPLOAD"}
tell finderLib
repeat with currentFolder in (listFiles at userVolume)
set allInfo to info for alias currentFolder
set isFolder to allInfo's folder
set isLocked to allInfo's locked
if currentFolder does not contain "DELETED.SAV" then
if currentFolder does not contain "RTERRA" then
if currentFolder does not contain "SUPLOAD"
then
if isFolder and not isLocked then
** DO SOMETHING HERE **
(copyFil
es, beep, whatever)
end if
end if
end if
end if
end repeat
end tell
sorry for the length of post, hope I gave enough info. & it makes sense
PS: still using v. 1.0
Thx in advance for your help.
BobT
=========================================================================
Date: Wed, 27 Apr 1994 06:36:00 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mark Alldritt <alldritt@WIMSEY.COM>
Subject: Re: What Apps are running
>Date: Tue, 26 Apr 1994 08:33:23 CDT
>From: Steve Havens - SMM <havens@ASTRO.SPA.UMN.EDU>
>Subject: What Apps are running
>
>Can anyone tell me a method for determining what applications are running?
>I need to close all apps before running a reset script I've written.
>
>Any help would be appreciated.
Try using the list processes command in my Script Tools package. I think
there is a similar command in the GTQ Scripting Library.
-Mark
=========================================================================
Date: Wed, 27 Apr 1994 07:33:51 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Neil Rest <neilrest@ECOTONE.TOAD.COM>
Subject: Re: AS interpreter?
Lack of a command line has been one of the Mac's most awful cripplings all
along.
It is 99 44/100% superior to DOS -- but cannot batch file!!
Neil
=========================================================================
Date: Wed, 27 Apr 1994 23:26:34 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
Subject: Mail document to person as Eudora Attachment
--========================_17162796==_
Content-Type: text/plain; charset="macintosh"
Content-Transfer-Encoding: quoted-printable
The attached file is an applet that takes any file droped onto it and mails
it off to the person specified in the file. I would change it to a bogus
email address as the default, except something seems to have happened to my
Applescript installation and I'm not entirely sure that modifying the one
that Quinn sent to me would be a good plan.
The applet has been sent to Steve Dorner for inclusion in the scripts
directory on ftp.qualcomm.com.
The applet is most likely public domain. To Quote Quinn and Peter from the
comments "As far as we=D5re concerned you can do whatever you like with this
script."
Please look at this file and modify it before testing it out. Peter
doesn't want your attachments!
Share and Enjoy,
Craig
--========================_17162796==_
Content-Type: application/mac-binhex40; name="Mail_To_Peter"
Content-Disposition: attachment; filename="Mail_To_Peter"
(This file must be converted with BinHex 4.0)
:$8eKD@`J9'mJ8'9dCA)!39"36'4`E(3K!!!!!!!!!#99SdS!!!!!!3!!!#1R!!!
LT`!!!Dk,!!!!!!!"rrm8!"ZR!+QPp!#!rrm!!"bA!!!!!!!!r`e0B@PX)&4[)&"
PG'9b!J!!!%&38%aNF'ad)!!!!!!!!!""8&"-C("XG#!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!+RNDP%!!!!!!!!P93!!!!#Arrm!!#!)!+QTd!#Arrm!!#"-!!!!!1R
!rrm!!#(6!!!!!2rrrrm!!#(T!!!!!!#!rrm!!#(h!!!!!2G58p*MrCZQF"'L%aF
ij*KQ6Q3MMY-U-MQIqSI#*k-c$2F&hFe*4&RI#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!3*'8N9'!!-"$NP$6L-!!!%qD@0X0!!!!8TTBh-M!!!"9QPMFc3!!!&
LD'CNFJ!!!@j659T&!!!"HPG3Eh-!!!''!)$rre!!!!!!V44m!!$rr`!!!(`!V4(
F!)$rr`!!!*S!V4,J"'Mrr`!!'a)!V4&m%iRrr`!!)@J!V4Kd"'Mrr`!!(!-!V44
d!!$rr`!!("d!V45!!!$rrb!!(#-!V45N!!(rra3!($m!V45J!)$rr`!!(5m!V45
F!!$rr`!!(@F!V45B!)(rr`!!(@`!V458!),rr`!!(AF!V453!!#$rrm!!"f#!+d
8M!#%rrm!!"f0!+d5[!#Arrm!!"fB!+d5d!#Arrm!!"kF!+d4a!#Arrm!!##J!+d
5$!#Arrm!!#$N!+d3U1R!rrm!!#*V!+d5"2rrrrm!!#+"!+d3q!#!rrm!!#+2!+p
hM#3E:
--========================_17162796==_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
--
Craig Richmond, Computer Officer, ECEL Computing Services +61 9 380 1405
The University of Western Australia or 380 3860 Email for FAX Number
craig@ecel.uwa.edu.au Dvorak Keyboards RULE! "Messes are only acceptable
if users make them. Applications aren't allowed this freedom" I.M.VI 2-4
--========================_17162796==_--
=========================================================================
Date: Wed, 27 Apr 1994 12:05:11 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Laurent Daudelin <laurent@PLANON.QC.CA>
Subject: Applet & Droplet
Hi all!
I just begun to take a look at AppleScript and have a question.
I'm using AppleScript 1.0, found in the AV Macs.
I tried to use a script already posted here, to automatically do
binhex translation of a file, using Stuffit Lite.
The script check syntax is ok. The problem is I don't have the
choice to save it as a drop-in application, in Script Editor. I
opened some drop-in applet, and when I want to save them, the option
for a droplet appears in the dialog, but not when I want to save my
script. Is there anything I'm missing here? I suppose yes....
On a related topic, what do you get when you buy the AppleScript
user-version from APDA? Any doc? Is there any electronic
documentation about the basics of AppleScript? I've search the
latest bookmark CD, but found nothing.
Any help very appreciated!
Laurent.
---
******************************************************************
Laurent Daudelin, Software Engineer
Planon TELEXPERTISE Inc., Boucherville, Quebec, CANADA
laurent@planon.qc.ca <-- NeXTMail welcome! (Mac Mail welcome too!)
=========================================================================
Date: Wed, 27 Apr 1994 12:35:38 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Applet & Droplet
In-Reply-To: <no.id> from "Laurent Daudelin" at Apr 27, 94 12:05:11 pm
--Laurent Daudelin wrote:
>
>I'm using AppleScript 1.0, found in the AV Macs.
You should definitely upgrade to 1.1.
>I tried to use a script already posted here, to automatically do
>binhex translation of a file, using Stuffit Lite.
>
>The script check syntax is ok. The problem is I don't have the
>choice to save it as a drop-in application, in Script Editor. I
>opened some drop-in applet, and when I want to save them, the option
>for a droplet appears in the dialog, but not when I want to save my
>script. Is there anything I'm missing here? I suppose yes....
What you are missing is an "on open" handler for your script. Your
script should look something like:
on open theFiles
[This is where you have the script commands for the binhex
translator, theFiles is a list that contains the pathnames
to the files dropped onto the droplet.]
end open
>On a related topic, what do you get when you buy the AppleScript
>user-version from APDA? Any doc? Is there any electronic
>documentation about the basics of AppleScript? I've search the
>latest bookmark CD, but found nothing.
If all you really want is some good documentation, then I recommend
buying the AppleScript Language Guide (English Dialect), from
Addison-Wesley. It will run you about $29.95 from your favorite
bookstore. Or you could buy the Complete AppleScript Handbook by Danny
Goodman. Also around $30, but it also comes with an upgrade to AS 1.1,
for the cost of the disk and shipping I believe.
-Hades
=========================================================================
Date: Wed, 27 Apr 1994 12:36:33 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: AS interpreter?
In-Reply-To: <no.id> from "Neil Rest" at Apr 27, 94 07:33:51 am
--Neil Rest wrote:
>
>Lack of a command line has been one of the Mac's most awful cripplings
>all along. It is 99 44/100% superior to DOS -- but cannot batch file!!
I seriously hope this is a joke.
-Hades
=========================================================================
Date: Wed, 27 Apr 1994 09:46:56 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "David Rogers,Eng" <david.rogers@ALDUS.COM>
Organization: Aldus Corporation, Seattle, WA
Subject: Re: AS interpreter?
I don't agree. There are times when a command-line is nice to have.
Otherwise there would be no MPW.
Regards,
David
---------------------------------------------------------------------------
david.rogers@aldus.com -========)-- Frodo Lives
--(========-
---------------------------------------------------------------------------
_______________________________________________________________________________
From: Macintosh Scripting Systems on Wed, Apr 27, 1994 9:46 AM
Subject: Re: AS interpreter?
To: David Rogers,Eng
--Neil Rest wrote:
>
>Lack of a command line has been one of the Mac's most awful cripplings
>all along. It is 99 44/100% superior to DOS -- but cannot batch file!!
I seriously hope this is a joke.
-Hades
=========================================================================
Date: Wed, 27 Apr 1994 13:04:23 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John Schettino <js12@GTE.COM>
Subject: Re: Omitting a small list from a larger list
>Hi All,
>
>This works, but I'm having trouble inserting another repeat loop and still
>only going through the 'big' list once:
>
>Thx in advance for your help.
>BobT
You were *SO* close, but it is simple (NOTE! May Only Work in AS 1.1)
set userVolume to "Admission.Users:"
set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
"Admission.Users:SUPLOAD"}
tell finderLib
repeat with currentFolder in (listFiles at userVolume)
set allInfo to info for alias currentFolder
set isFolder to allInfo's folder
set isLocked to allInfo's locked
if noCopyList does not contain currentFolder then
if isFolder and not isLocked then
** DO SOMETHING HERE **
(copyFiles, beep, whatever)
end if
end if
end repeat
end tell
Note that if statement!
In AS (1.1?) you can ask if a list (noCopyList) contains an element
(currentFolder)
Just try this code snippit, If you get true as the result, then it works in 1.0
set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
"Admission.Users:SUPLOAD"}
noCopyList contains "Admission.Users:DELETED.SAV"
- john
-----------------------------------------
js12@gte.com GTE Laboratories
John Schettino Waltham, MA
=========================================================================
Date: Wed, 27 Apr 1994 10:10:32 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Applet & Droplet
>Hi all!
>
>I just begun to take a look at AppleScript and have a question.
>
>I'm using AppleScript 1.0, found in the AV Macs.
Version 1.1 of AppleScript fixes some problems with 1.0. You might want to
purchase an upgrade. You might want to wait, if you're not having
problems, for the "spring" release (now due in summer, 'tis said) of System
7.5.
>I tried to use a script already posted here, to automatically do
>binhex translation of a file, using Stuffit Lite.
>
>The script check syntax is ok. The problem is I don't have the
>choice to save it as a drop-in application, in Script Editor. I
>opened some drop-in applet, and when I want to save them, the option
>for a droplet appears in the dialog, but not when I want to save my
>script. Is there anything I'm missing here? I suppose yes....
To be a droplet, a script requires a handler for the open message. That
handler receives control when a file is dropped onto the droplet. Check
out one of the example droplets for details.
>On a related topic, what do you get when you buy the AppleScript
>user-version from APDA? Any doc? Is there any electronic
>documentation about the basics of AppleScript? I've search the
>latest bookmark CD, but found nothing.
The documentation does come with the purchased version...it is also
available in bookstores. That should be true there in Quebec, as it is
here.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 27 Apr 1994 12:31:24 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: AS interpreter?
In-Reply-To: Your message of "Wed, 27 Apr 94 09:46:56 PDT"
David,
>I don't agree. There are times when a command-line is nice to have.
>Otherwise there would be no MPW.
>
I have to agree with you. One of my favorite features in Frontier is the
Instant or Quick Script window....I just want it available no matter what
program I'm in. But then, maybe I've been spending too much time on
workstations. :-)
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Wed, 27 Apr 1994 14:14:58 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Re: What Apps are running
> Can anyone tell me a method for determining what applications are
> running? I need to close all apps before running a reset script I've
> written.
>
> Any help would be appreciated.
the "list applications" osax from the GTQ programming suite should work fine.
GTQ is on gaea in applescript/osaxen, or i can email it if you need.
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Wed, 27 Apr 1994 14:22:20 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
Subject: Re: Menu Events
I'm not sure if this is what you were talking about, but I wrote a
script to be able to easier use Menu Events. Normally, you are supposed
to use ResEdit to paste the aete into the app you wish to control. i
don't know about you, but to me this is a pain in the butt. insted, just
paste this script at the bottom of the script you are writing, and call
it as follows:
to query a menu list, use
QueryMenuList(application <app name>)
and it will return the info. To query a menu, use
QueryMenu(application <app name>, menu id)
to do a menu item, use
DoMenuItem(application <app name>, Menu ID, Menu Item ID)
ps. i just posted a much improved version of this script to info-mac, so
it should show up soon. get it from there if you can't get this version
to work. the better version lets you do a menu by giving the subroutine
the name of the app, menu title, and menu item, and lots better error
handling.
***attached script follows***
on QueryMenuList(apl)
try
tell apl
return (<<event MAEnuqmn#>>)
-- in the above line, the "MAEnuqmn#" should have "AE" as one character
end tell
on error (errID)
return (errID as string)
end try
end QueryMenuList
on QueryMenu(apl, MenuID)
try
tell apl
return (<<event MAEnuqmn >> given <<class mnid>>:MenuID)
-- in the above line, the "MAEnuqmn " should have "AE" as one character
end tell
on error (errID)
return (errID as string)
end try
end QueryMenu
on DoMenuItem(apl, MenuID, MenuItemID)
try
tell apl
<<event MAEnusemi>> given <<class mnid>>:MenuID, <<class miid>>
:MenuItemID
-- in the above line, the "MAEnusemi" should have "AE" as one character
end tell
return ""
on error (errID)
return (errID as string)
end try
end DoMenuItem
--
My opinions are mine only and tentative, pending further data
Matthew Ahrens
ai261@FreeNet.Carleton.ca ai158@FreeNet.Buffalo.edu
MacRules2@aol.com <-Last Resorts-> Matthew210@aol.com
=========================================================================
Date: Wed, 27 Apr 1994 14:40:21 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Aaron Mansheim <mansheim@CSUGRAD.CS.VT.EDU>
Subject: AS interpreter
Sorry, I didn't mean to start a thread on the merits of Mac OS.
But since I did, here's my take :) I think AppleScript supplies
batch processing perfectly well. It's just 1) not interactive the
way an interpreter is and 2) not directly useable for controlling a
Mac remotely via something less graphical. Presumably "most users"
don't care about these features, as it's much easier to use the
graphical interface.
Now that I've installed ScriptDaemon, I'm enjoying the chance
to use the AppleScript I've learned as if using an interpreter. This
way I don't feel the need to sit down and try to write a complete
package for some purpose the way I do when using the Script Editor.
The ScriptDaemon prompt stares at me just as hard as an empty Script
Editor window, but ScriptDaemon only wants one command to be happy :)
On the other hand, pretty soon I'll want to create something to allow
me to keep a current path and change directory from it. Using "list
folder" with full pathnames all the time gets old.
I don't think I'll be using ScriptDaemon remotely until I've
learned the file IO commands from Script Tools. Shouldn't be too hard.
My next thing to look for is a way to access dictionaries from a
script.
Thanks to those who suggested ScriptDaemon and to Peter Lewis,
who seems to be very busy.
=========================================================================
Date: Wed, 27 Apr 1994 12:09:22 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Getting the FM Field Index
Getting the FM Field Index in AS
I'm trying to optimize a script by doing only searches for items that are
actually in a database. Now, FM can easily (and very quickly) give me a list
of values in a field by giving me the index of that field (Edit, Paste
Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
=========================================================================
Date: Wed, 27 Apr 1994 15:24:15 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Resent-From: David Avery <DAVID@DARTCMS1>
Comments: Originally-From: sheaj@ohsu.edu (Jackson Shea,PC,Microbiology)
From: David Avery <DAVID@DARTCMS1.BITNET>
Subject: Re: AS interpreter?
In-Reply-To: your message of Wed Apr 27 12:31:24 -0500 1994
I don't know if anyone has mentioned it but there is a product calle CLImate
for the macintosh which provides dos/unix flavored commands for file
manipulation.
There is a review of it in MacWeek (7/26/93 with rebuttal by the company in
9/6/93).
Pertinent info:
CLImate
Orchard Software Inc.
P.O. Box 380814
Cambridge, MA 02238-0814
(617) 876-4608
SRP: $59.95
Jackson Shea
---------------------------------
Oregon Health Sciences University Voice: (503)494-2444
Molecular Microbiology & Immunology Fax: (503)494-6862
Mail Code L220 inet: sheaj@ohsu.edu
Portland, Oregon 97201-3098 USA or jshea@lclark.edu
=========================================================================
Date: Wed, 27 Apr 1994 15:04:41 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: hunt andrew n <andy@UX1.CSO.UIUC.EDU>
Subject: Eudora send mail script
In-Reply-To: <199404271938.AA27001@ux1.cso.uiuc.edu> from "David Rogers,
Eng" at Apr 27, 94 09:46:42 am
I just tried out the recently posted Eudora script and have
a question about it.
When I try and use it (drag/drop and double click) I get
the error message "Could not run the Script "Mail to Peter
because the script's data format is too new for scripting
component to read it"
Does this mean that I need a newer version of Applescript?
I have version 1.0 of AppleScript and also v 1.0.1 of the Script Editor.
Both came with the Tao of Applescript book. Is there an update?
Thanks!
ah.
Andrew Hunt
Book Designer @ University of Illinois Press
a-hunt2@uiuc.edu
=========================================================================
Date: Wed, 27 Apr 1994 17:01:04 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mel Walker <mwalker@NETCOM.COM>
Subject: Re: Mail document to person as Eudora Attachment
>--========================_17162796==_
>Content-Type: text/plain; charset="macintosh"
>Content-Transfer-Encoding: quoted-printable
>
>The attached file is an applet that takes any file droped onto it and mails
>it off to the person specified in the file. I would change it to a bogus
>email address as the default, except something seems to have happened to my
>Applescript installation and I'm not entirely sure that modifying the one
>that Quinn sent to me would be a good plan.
>
>The applet has been sent to Steve Dorner for inclusion in the scripts
>directory on ftp.qualcomm.com.
>
>The applet is most likely public domain. To Quote Quinn and Peter from the
>comments "As far as we=D5re concerned you can do whatever you like with this
>script."
>
>Please look at this file and modify it before testing it out. Peter
>doesn't want your attachments!
>
>Share and Enjoy,
>Craig
Why didn't you write the script like so:
property recipient: "user@machine.com"
on open theFiles
tell application "Eudora"
make message InsertHere end of mailbox "out" of mail folder ""
set field "to" of message 0 to recipient
set field "subject" of message 0 to "File Transfer"
attach message 0 DocumentList theFiles -- note change
queue message 0
end tell
end open
instead of doing all that work to make the X-Attachments line as you did?
--Mel Walker
--
Mel Walker mwalker@netcom.com
"Actually, I just like to say the word 'Smock.' Smock Smock Smock Smock
Smock Smock Smock!" - Hobbes
=========================================================================
Date: Wed, 27 Apr 1994 23:37:15 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bill Johnston <johnston@ME.UDEL.EDU>
Subject: parsing text in AppleScripts
Greetings to macscrpt readers ...
I have a question that doesn't appear to be addressed in the FAQ or
Tao of AppleScript. It's fairly clear from the language description
that AS is not intended to be a text-parsing language, but I'd like
to find some basic string manipulation beyond that offered in the
String Commands osax that comes with AppleScript. The only thing
I've found that comes close were some of the Rinaldi externals
in the XCMD osax package, but the functionality is not exactly
what I'm looking for.
Specifically, I'd like something that would let me manipulate
strings as in HyperCard -- for example:
get char (offset "[" of str) to (offset "]" of str) of str
which would mimic the HyperTalk
get char (offset("[",str)) to (offset("]",str)) of str
which returns "[text]", say, if str is "Some [text] here".
Assuming that such string-parsing tools are not available as
osaxen, would it be a good approach to create Xthings with
ThinkC or CompileIt, and add it to the XCMD osax, or is it
easier to write osaxen directly with Think C?
I'm aware that some of what I'd like to do might be doable
using the scriptable text parsing of a MacPerl, but launching
that is overkill for the current project, in which I'd like
to parse the result of "current date" to build a string like
"940427" to append to the name of a backup file.
Suggestions and pointers to books, FAQs, or ftp sites
gratefully accepted!
Bill
-- Bill Johnston (johnston@me.udel.edu)
-- 38 Chambers Street; Newark, DE 19711; (302)368-1949
=========================================================================
Date: Wed, 27 Apr 1994 21:05:21 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Re: parsing text in AppleScr
Reply to: RE>parsing text in AppleScript
Bill Johnston says:
>Specifically, I'd like something that would let me manipulate
>strings as in HyperCard -- for example:
> get char (offset "[" of str) to (offset "]" of str) of str
You mean something like,
set str to "just some text with [a string] in brackets"
set astring to (characters ((offset of "[" in str) + 1) thru ((offset of "]"
in str) - 1) of str) as text
?
Works for me ...
-roy, wondering if anybody's got some Excel-related scripts I could take a
look at?
=========================================================================
Date: Wed, 27 Apr 1994 22:43:22 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: parsing text in AppleScripts
>Specifically, I'd like something that would let me manipulate
>strings as in HyperCard -- for example:
>
> get char (offset "[" of str) to (offset "]" of str) of str
Not what you want, but in Frontier's UserTalk, that would be simple:
str1 =3D string.nthField (str, ']', 1)
str1 =3D string.nthField (str1, '[', 2)
[The first line makes string 1 everything before the first ']'...the second
makes str1 everything after the first '['. If you don't need the original
str, you can just store back into that, rather than using str1. I'm too
lazy to figure out whether the HyperTalk includes the [ and ] or not...the
UserTalk doesn't but they could easily be added back, by changing the
second line to
str1 =3D "[" + string.nthField (str1, '[', 2) + "]"
>Assuming that such string-parsing tools are not available as
>osaxen, would it be a good approach to create Xthings with
>ThinkC or CompileIt, and add it to the XCMD osax, or is it
>easier to write osaxen directly with Think C?
Unless you are very comfortable already writing XCMDs (or want an XCMD for
your HyperCard work, too), just write the osax directly. osaxen are easy.
>I'm aware that some of what I'd like to do might be doable
>using the scriptable text parsing of a MacPerl, but launching
>that is overkill for the current project, in which I'd like
>to parse the result of "current date" to build a string like
>"940427" to append to the name of a backup file.
This snippet requires AppleScript 1.1 (so does sanity), and I sincerely
hope that there is a way to get the numeric month, rather than the
enumerated type as found below. The following should be fine in other
languages, too. It does produce a nice numeric string representing the
date:
set foo to current date
set yr to characters 3 through 4 of ((year of foo) as string) as string
set mo to (month of foo)
set da to (day of foo) as string
if (count of (da as string)) < 2 then set da to "0" & da
if mo =3D January then
set mo to "01"
else if mo =3D February then
set mo to "02"
else if mo =3D March then
set mo to "03"
else if mo =3D April then
set mo to "04"
else if mo =3D May then
set mo to "05"
else if mo =3D June then
set mo to "06"
else if mo =3D July then
set mo to "07"
else if mo =3D August then
set mo to "08"
else if mo =3D September then
set mo to "09"
else if mo =3D October then
set mo to "10"
else if mo =3D November then
set mo to "11"
else
set mo to "12"
end if
return yr & mo & da
(It's fine in French, apparently (gotten just by changing the dialect in
the preferences)):
mets foo =E0 date courante
mets yr =E0 chaque caract=E8re depuis 3 jusqu'=E0 4 de ((ann=E9e de foo) com=
me
cha=EEne) comme cha=EEne
mets mo =E0 (mois de foo)
mets da =E0 (jour de foo) comme cha=EEne
si (compte de (da comme cha=EEne)) < 2 alors mets da =E0 "0" & da
si mo =3D Janvier alors
mets mo =E0 "01"
sinon si mo =3D F=E9vrier alors
mets mo =E0 "02"
...
sinon si mo =3D Novembre alors
mets mo =E0 "11"
sinon
mets mo =E0 "12"
fin si
renvoie yr & mo & da
[Eudora will use a quoted form for the French a` (to)...what your mail
reader will do with it I don't know...likewise the other accented
characters.]
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Wed, 27 Apr 1994 11:27:30 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: QMGATE <QMGATE.INET@QMGATE.LARC.NASA.GOV>
Subject: QM Server Problems - Please
Mail*Link(r) SMTP Mail document to person as Eudora
See enclosed file of Mail To Peter
(This file must be converted with BinHex 4.0)
:$8eKD@`J9'mJ8'9dCA)!39"36'4`E(3!!!!!!!!!!#99p3)!!!!!!3!!!#1R!!!
LT`!!!Dk,!!!!!!!"rrm8!"ZR!+QPp!#!rrm!!"bA!!!!!!!!r`e0B@PX)&4[)&"
PG'9b!J!!!%&38%aNF'ad!!!!!!!!!!""8&"-C("XG!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!+RP(&8!!!!!!!!P93!!!!#Arrm!!#!)!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!!!MT`!!)UF!!!'Z!+d++"2@!!!!(!'Z!""16e4*!!!!LR0MFhS!!!#
@Ff0`G!!!!+*849K8!!%!VR0dH@`!!!$'Fh"cD!!!!0*$6d4&!!%!hN*14%`!!!$
fC("XG!!!!3*'8N9'!!-"$NP$6L-!!!%qD@0X0!!!!8TTBh-M!!!"9QPMFc3!!!&
LD'CNFJ!!!@j659T&!!!"HPG3Eh-!!!''!)$rre!!!!!!V44m!!$rr`!!!(`!V4(
F!)$rr`!!!*S!V4,J"'Mrr`!!'a)!V4&m%iRrr`!!)@J!V4Kd"'Mrr`!!(!-!V44
d!!$rr`!!("d!V45!!!$rrb!!(#-!V45N!!(rra3!($m!V45J!)$rr`!!(5m!V45
F!!$rr`!!(@F!V45B!)(rr`!!(@`!V458!),rr`!!(AF!V453!!#$rrm!!"f#!+d
8M!#%rrm!!"f0!+d5[!#Arrm!!"fB!+d5d!#Arrm!!"kF!+d4a!#Arrm!!##J!+d
5$!#Arrm!!#$N!+d3U1R!rrm!!#*V!+d5"2rrrrm!!#+"!+d3q!#!rrm!!#+2!+p
hM,K!:
=========================================================================
Date: Thu, 28 Apr 1994 08:40:05 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Tom Donovan <donovan@COVIS.NWU.EDU>
Subject: Re: AS Interpreter
I was reading through HyperTalk 2.2: The Book, by Winkler, Kamins, & DeVoto
when I happened upon a discussion of the HyperTalk "do" command and the
following example script:
on mouseUp
ask "Please enter a line of AppleScript:"
if it is not empty then do it as AppleScript
end mouseUp
It occurred to me that if one created a one-card stack with a field on it
to receive AS statements, one might be able to simulate a command-line
interface. Granted, it would probably be painfully slow, but it's a start.
Just an idea...
--Tom
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tom Donovan "Perhaps the most universal information trap is the...
System Administrator trap of forgetting what it's like not to know. The
CoVis Project minute we know something, we forget what it was like
Northwestern Univ. not to know it." --Richard S. Wurman
"Information Anxiety"
E-mail: donovan@covis.nwu.edu
(Check out the CoVis Web Server at URL: http://www.covis.nwu.edu/)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=========================================================================
Date: Thu, 28 Apr 1994 14:55:05 GMT0BST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Alistair G. Lowe-Norris" <agl1@LEICESTER.AC.UK>
Subject: Complete AppleScript Handbook - Out of Print
I have just tried to obtain a copy of this through my normal
University book-shop and have been told that it is now out-of-print.
I contacted MacLine (UK) and grabbed the last copy off of their
shelves - they did not know it was OOP.
Does anyone know whether it is OOP and if so when it is being printed
again.
Alistair.--
---------------------------------------------------------------------------
| Alistair G. Lowe-Norris, Systems Programmer E-mail : agl1@le.ac.uk |
| Computer Centre, Leicester University, |
| University Road, Leicester LE1. 7RH., U.K. |
| |
| UK Tel: (0533) 522250 Fax: (0533) 525027 |
| Non-UK Tel: +44 (533) 522250 Fax: +44 (533) 525027 |
---------------------------------------------------------------------------
=========================================================================
Date: Wed, 27 Apr 1994 21:16:15 PDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: network_manager@ALDUS.COM
Organization: Aldus Corporation, Seattle, WA
Subject: NDN:Re: parsing text in AppleScr
Your mail to the Microsoft Mail Server could not be fully
delivered! No Valid Addresses! It has been deleted.
Error List:
Bad 'To:' Address: David Rogers,Eng@Sea12
=========================================================================
Date: Thu, 28 Apr 1994 11:13:01 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Alex <steve_alex@POSTOFFICE.AIDT.EDU>
Subject: PowerShare Mail
We are in the midst of a painful process of moving to PowerShare Mail from
QuickMail. We've got QuickMail AOCE so that the users have a somewhat
familiar face, but there are a couple of missing features that are causing us
grief.
1. There is no way of knowing whether a mail message has been read or not (or
return receipt), you just know that it had been sent to the PowerShare
server. We've tried to use mail as the primary means of sending
correspondence. If it is important, the users will check the mail log to see
if mail has been read in what they consider an adequate amount of time, if
not they may revert to ancient means of communication, such as the phone
system!
2. Notification of new mail arriving does not happen unless the user
remembers to unlock their key chain.
3. If PowerShare temporarily loses a service (network glitch, etc.) it
creates an alert condition that must be cleared before new mail is received,
but the user is not alerted about the problem unless they open their In Tray
(and see the alert icon and correct the problem).
4. We've lost the QuickConference capability.
While most of these "missing features" are problems with PowerShare, I'm
looking for temporary fixes, possibly with AS. I've been tempted to put a
FaceSpan (Frontmost) application that's kind of an administrator's aid (if
the FaceSpan memory leak is fixed) on everyone's machine. It could
periodically check if the key chain is unlocked (GTQ's "get user" will return
an error if keychain is unlocked). If I could figure out how get to the read
check mark, I might be able to respond to a "has message been read" request.
I could probably even implement a QuickConference hack. But maybe someone
knows of a better way of dealing with these problems, possibly on the server.
+---------------------------------------+----------------------------------+
| --------------+ Steve Alex | All ideas here are my own and |
| +---------- | Alabama Industrial | in no way reflect my employer's. |
| | ----------+ Development Training | steve_alex@aidt.edu |
| +---------------------------------- | |
+---------------------------------------+----------------------------------+
=========================================================================
Date: Thu, 28 Apr 1994 09:19:41 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Michel <michel@NETCOM.COM>
Subject: Re: Getting the FM Field Index
>Getting the FM Field Index in AS
>
>I'm trying to optimize a script by doing only searches for items that are
>actually in a database. Now, FM can easily (and very quickly) give me a list
>of values in a field by giving me the index of that field (Edit, Paste
>Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
There's no way to get the index of a field directly, but here's a handler
that first gets all the entries in a field (across the entire database or
shown set, and then removes all the duplicates:
on getUniqueItems of fieldName given dataBase:theFile
tell application "FileMaker Pro" -- get everything from the field
copy Field fieldName of Document theFile to theList
end tell
copy {} to unqiueItems -- to hold only uniqe values
repeat with x in theList
if x is not in unqiueItems then
copy unqiueItems & x to unqiueItems
end if
end repeat
return unqiueItems
end getUniqueItems
call it with something like:
copy getUniqueItems of "model" given dataBase:"pict catalog" to myList
This is none too fast, especially with large databases, but it does work.
Steve
=========================================================================
Date: Thu, 28 Apr 1994 12:36:50 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: John Schettino <js12@GTE.COM>
Subject: Re: Getting the FM Field Index
>>Getting the FM Field Index in AS
>>
>>I'm trying to optimize a script by doing only searches for items that are
>>actually in a database. Now, FM can easily (and very quickly) give me a list
>>of values in a field by giving me the index of that field (Edit, Paste
>>Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
>
>There's no way to get the index of a field directly, but here's a handler
>that first gets all the entries in a field (across the entire database or
>shown set, and then removes all the duplicates:
>
>on getUniqueItems of fieldName given dataBase:theFile
> tell application "FileMaker Pro" -- get everything from the field
> copy Field fieldName of Document theFile to theList
> end tell
> copy {} to unqiueItems -- to hold only uniqe values
> repeat with x in theList
> if x is not in unqiueItems then
> copy unqiueItems & x to unqiueItems
> end if
> end repeat
> return unqiueItems
>end getUniqueItems
>This is none too fast, especially with large databases, but it does work.
If you have AS1.1, you can speed it up using the following:
on getUniqueItems of fieldName given dataBase:theFile
tell application "FileMaker Pro" -- get everything from the field
copy Field fieldName of Document theFile to theList
end tell
set unqiueItems to {} -- to hold only uniqe values
repeat with x in theList
if x is not in unqiueItems then
set end of unqiueItems to x
end if
end repeat
return unqiueItems
end getUniqueItems
A minor change, but it does eliminate quite a bit of time on all the list
copies.
- john
-----------------------------------------
js12@gte.com GTE Laboratories
John Schettino Waltham, MA
=========================================================================
Date: Thu, 28 Apr 1994 09:45:50 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Re: Getting the FM Field In
Reply to: RE>>Getting the FM Field Ind
Say, a related question then: How big can lists get in AS? In other words,
can AS handle a list that will be 16,000 items long? If not, can I just
increase the memory allocation for the application created, and if so, to
what?
-roy
=========================================================================
Date: Thu, 28 Apr 1994 12:01:17 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
Subject: Re: AS Interpreter
Or you can just type stuff into a field in HyperCard and execute it at the
press of return or enter or whatever you choose.
My Messenger application has that AS feature. Messenger is for one-to-one
chatting over AppleTalk LANs, but you can also type AppleScript commands
and select "Do AppleScript Commands" from the AS menu.
Messenger was written in HyperCard 2.1 and 2.2, is a stand-alone
application, and is available at sumex-aim, umich and all their mirrors.
-DM
>I was reading through HyperTalk 2.2: The Book, by Winkler, Kamins, & DeVoto
>when I happened upon a discussion of the HyperTalk "do" command and the
>following example script:
>
> on mouseUp
> ask "Please enter a line of AppleScript:"
> if it is not empty then do it as AppleScript
> end mouseUp
>
>It occurred to me that if one created a one-card stack with a field on it
>to receive AS statements, one might be able to simulate a command-line
>interface. Granted, it would probably be painfully slow, but it's a start.
>
>Just an idea...
>
>
>--Tom
Desmond K. Mullen - University of Minnesota, Office of Admissions
mulle009@maroon.tc.umn.edu - 612/625-0824
=========================================================================
Date: Thu, 28 Apr 1994 14:16:20 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Leo <mleo@ENIAC.SEAS.UPENN.EDU>
Subject: Dialog Box
Simple question follows. Given a dialog box that comes up with some text
highlighted and buttons to choose, cancel connect, how do I tell it to
choose a specific button? Thanks.
LEO
------------------------------------------------------------------------
Michael Leo | University Of Pennsylvania
mleo@eniac.seas.upenn.edu | School Of Engineering
mleo@wkstas.section.upenn.edu | Computer Science & Engineering
| maybe Management also
finger @kin648.resnet.upenn.edu |
talk @kin648.resnet.upenn.edu |
-------------------------------------------------------------------------
=========================================================================
Date: Thu, 28 Apr 1994 14:20:18 EST
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Sam McLane <Sam_McLane@COMPSERV.OCIS.TEMPLE.EDU>
Subject: Re: Dialog Box
Simple question follows. Given a dialog box that comes up with some text
highlighted and buttons to choose, cancel connect, how do I tell it to
choose a specific button? Thanks.
LEO
I guess by it you mean the script, as in a default button?
Try this
display dialog "Hello world" Buttons {"OK","Cancel","foo"}
default button "Ok"
-Sam McLane
sam@astro.ocis.temple.edu
=========================================================================
Date: Thu, 28 Apr 1994 14:41:04 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Allan Marcus <allan_marcus@LANL.GOV>
Subject: Boot time OASX???
Anyone know of a script or OASX thast can tell me the time the user booted
the MAc? (that's boot-up, not kicked!)
Thanks,
Allan
---------------------------------------
Allan Marcus
Los Alamos National Laboratory
"My opinions are my own, I think..."
Voice: 505-665-1828
CIS: 76666,2113
AppleLink: Allan.Marcus
e-world/NewtonMail: Allan.M
InterNet: allan_marcus@lanl.gov <- note new address (deja vu!)
---------------------------------------
=========================================================================
Date: Thu, 28 Apr 1994 15:31:53 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George R. Brown" <gbrown@PARTECH.COM>
Subject: Re: Dialog Box
At 02:20 PM 4/28/94 -0500, Sam McLane wrote:
>Simple question follows. Given a dialog box that comes up with some text
>highlighted and buttons to choose, cancel connect, how do I tell it to
>choose a specific button? Thanks.
>
> LEO
>
>I guess by it you mean the script, as in a default button?
>
>Try this
>
>display dialog "Hello world" Buttons {"OK","Cancel","foo"}
> default button "Ok"
>
Along the same lines, is there a way to put up an ask box (similar to
HyperCard's ask command), fill it with a default, and determine which
button was selected (in case Cancel was selected)?
- gb (george@partech.com)
=========================================================================
Date: Thu, 28 Apr 1994 14:49:37 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Dialog Box
>At 02:20 PM 4/28/94 -0500, Sam McLane wrote:
>Along the same lines, is there a way to put up an ask box (similar to
>HyperCard's ask command), fill it with a default, and determine which
>button was selected (in case Cancel was selected)?
The display dialog command is a Scripting Addition. As such, it has an
AppleScript Dictionary, which you can easily open. [In AppleScript 1.1,
the open file dialog for the Dictionary includes a button which takes you
directly to the Scripting Additions folder (even when you are already there
<sigh!>).]
Here's the Dictionary entry:
display dialog: Display a dialog.
display dialog anything -- title of dialog
[default answer anything] -- default editable text
[buttons list] -- list of up to three buttons
[default button anything] -- name or number of default button
[with icon anything] -- name or id of the icon to display
[with icon stop/note/caution] -- display one of these system icons
Result: reply -- record containing the button hit and text entered
(if any)
So, yes, you can do what you ask (the reply can be looked at to see which
button was hit, and what the user typed if the Cancel button wasn't hit).
Experiment.
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Thu, 28 Apr 1994 13:40:16 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: Boot time OASX???
>Anyone know of a script or OASX thast can tell me the time the user booted
>the MAc? (that's boot-up, not kicked!)
How about an applet that launches at startup (sitting in the startup
folder), writes a time stamp to the end of a text file, maybe culls out
some of the old entries or keeps a maximum number of paragraphs in the text
file and then closes the text file and quits. Then you could open the text
file and read it.
Just an idea.
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Thu, 28 Apr 1994 19:51:26 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
Subject: MS: MIME Headers
Words from the LISTSERV Gods regarding the troubles some of you have had
regarding MIME headers being lost:
Eudora users who submit postings to MACSCRPT should send the command
SET FULLHRD ON
to listserv. This will cause their subsequent postings to retain the
Mime header line.
This accounts for why some postings looked correct --- those from users
who had set the header status to full.
-A
=========================================================================
Date: Thu, 28 Apr 1994 19:26:15 -0600
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Brian Caldwell <caldwell@WELL.SF.CA.US>
Subject: APDA AppleScript Info
Just got my new APDA catalog (April 1994) and I thought I would share the
following info. From page 11 thereof:
(begin quote)
AppleScript Software Development Toolkit v. 1.1
Apple Computer, Inc.
Whether you're a commercial developer, in-house programmer, consultant, or
system integrator, building AppleScript support into your applications will
help you address the increasing demand to integrate off-the-shelf software
into custom solutions.
With AppleScript, you can compile scripts or create standalone applications
that let people perform complex operations by just clicking a mouse button.
This Software Development Kit includes the AppleScript language, system
software extension, and script editor; the FaceSpan Interface Processor
from Software Designs Unlimited Inc.; Data Access Language scripting
addition, development tools, sample code, and electronic documentation. It
also includes Finder scripting software that lets you control standard
Finder operations.
Licensing Note: Commercial developer redistribution licenses for
AppleScript system software are available through Apple Software Licensing
at (408) 974-4667.
System Requirements: A 68000 Macintosh computer or greater with 4 MB of
RAM, System 7 or later, and a CD-ROM drive.
Product Contents: Four Macintosh disks and one CD-ROM disc; three manuals:
The AppleScript Language Guide (English Dialect), Getting Started with
AppleScript, AppleScript Guide to Scriptable Applications; and a solution
developer's redistribution license for AppleScript system software and
FaceSpan runtime code.
AppleScript Software Development Toolkit v. 1.1
R0175Z/B.....$199.00
AppleScript Software Development Toolkit v. 1.0 to v. 1.1 upgrade
R0557Z/A......$99.00
(end quote)
And from page 10, the following may also be of interest:
(begin quote)
Apple Events/AppleScript Programming Tutorial
Apple Computer, Inc.
The Apple Events/AppleScript Programming Tutorial is the fastest way to get
ready for Apple event and AppleScript programming. This self-paced disk and
workbook tutorial teaches you the basics of Apple's new scripting
architecture. Using core modules from Developer University's classroom
course, this mini-course will teach you how to make your applications
script-ready and recordable. It will also prepare you to take advantage of
AppleScript software.
System Requirements: A macintosh Plus or later, with 4 MB or RAM and System
7 or later.
Product Contents: One Macintosh disk and one workbook.
Apple Events/AppleScript Programming Tutorial
R0224LL/A....$150.00
(end quote)
Ordering info for APDA is:
Phone: U.S. (800) 282-2732
Canada (800) 637-0029
Int'nat'l. (716) 871-6555
Fax: (716) 871-6511
Hours: M-F 700am-500pm PT
E-mail:
Applelink: APDA
CompuServe: 76666,2405
Internet: APDA@applelink.apple.com
America Online: APDAorder
Mail:
APDA
Apple Computer, Inc.
P.O. Box 319
Buffalo, NY 14207-0319
USA
Payment Methods:
MasterCard, VISA, American Express, US Checks, postal money orders
NOTE: The above information is provided entirely as a net.service. I assume
no liability for your actions. I have no connection with Apple Computer,
Inc. or APDA. Trademarked names and service marks are property of their
respective companies where found above.
Peace,
Brian
------
--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
caldwell@netcom.com
caldwell@well.sf.ca.us bcaldwell@aol.com
PGP 2.3 key available via public key servers or direct email
----------------------------------------------------------------------------
"The future is not set. There is no fate but what you make."
- John Conner, "The Terminator", "Terminator 2"
--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
=========================================================================
Date: Thu, 28 Apr 1994 18:02:04 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Exporting Records
Exporting Records
Anyone know of a way for AppleScript to tell FileMaker Pro to export found
records into a file?
(going both to the Macscript listserv group and the FMPro listserv group)
-roy
=========================================================================
Date: Fri, 29 Apr 1994 09:19:58 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
Subject: Re: AS Interpreter
Peter Lewis and I were having intermitant problems of Script Daemon
refusing connection when supplied with a valid name and password.
A solution that seems to work is to give Script Daemon more memory. There
are probably all sorts of bizarre fluctuating memory requirements when you
start dealing with Applescript in your programs.
Share and Enjoy,
Craig
--
Craig Richmond, Computer Officer, ECEL Computing Services +61 9 380 1405
The University of Western Australia or 380 3860 Email for FAX Number
craig@ecel.uwa.edu.au Dvorak Keyboards RULE! "Messes are only acceptable
if users make them. Applications aren't allowed this freedom" I.M.VI 2-4
=========================================================================
Date: Thu, 28 Apr 1994 19:00:49 U
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
Subject: Scope
Scope
I'm experiencing a problem due to my ignorance regarding scope in AppleScript
scripts.
To give a simple example, look at this script:
--
set thelist to {"foo", "bar"}
on open (listoffiles)
global thelist
doit()
end open
on doit()
global thelist
display dialog (item 1 of thelist)
end doit
--
Now, this returns 'thelist is not defined' when run. However, if I were to
do
--
set thelist to { "foo", "bar"}
doit()
on doit()
global thelist
display dialog (item 1 of thelist)
end doit
--
This works fine, and I get 'foo'.
Now, clearly, I'm missing something about the scope of thelist here. I need
to find a way to tell doit() what thelist is, and while I did originally
figure I could just define thelist inside the 'on open' subroutine and give
it to all the subroutines, this seems rather wasteful and does seem to cause
some slowing ...
Any advice? Comments? Condescending sniggering?
-roy
=========================================================================
Date: Fri, 29 Apr 1994 12:48:17 +0930
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
Subject: Re : Boot time OSAX
>Anyone know of a script or OASX thast can tell me the time the user booted
>the MAc? (that's boot-up, not kicked!)
How about the program "StarupLog v1.0", placed in your Startup Items,
writes the boot date & time to a Log file (text) which you can read/edit at
any time.
Just a suggestion.
Paul J. Stoll
Computer Systems Officer
Computer Assisted Learning Unit
Flinders University of South Australia
Flinders Medical Centre
Bedford Park. 5042.
South Australia.
Ph. : (08) 204 4163
Fax : (08) 277 0085
=========================================================================
Date: Thu, 28 Apr 1994 22:50:48 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Scott Trotter <strotter@NETCOM.COM>
Subject: Re: Boot time OASX???
>>Anyone know of a script or OASX thast can tell me the time the user booted
>>the MAc? (that's boot-up, not kicked!)
>
>How about an applet that launches at startup (sitting in the startup
>folder), writes a time stamp to the end of a text file, maybe culls out
>some of the old entries or keeps a maximum number of paragraphs in the text
>file and then closes the text file and quits. Then you could open the text
>file and read it.
There's an even simpler, but very unreliable, way of doing this: Some INITs
and/or their preference files are modified at startup time. Pick one that
isn't modified at any time *other* than at startup, then use the standard
"Info for" OSAX to get it's modification date and time.
This method is completely non-transportable, guaranteed to eventually
break, bad enginering, a total kludge, etc, etc, but it'll work in a pinch.
--
======================================================================
Scott Trotter Desktop Strategies Beaverton, Oregon, USA
email: strotter@netcom.com fax: 503.641.2983 voice: 503.641.3741
=========================================================================
Date: Thu, 28 Apr 1994 23:35:42 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Boot time osax
>Anyone know of a script or OASX thast can tell me the time the user booted
>the MAc? (that's boot-up, not kicked!)
Jon's Commands 1.1 has a command "the ticks" which is the number of ticks
since the Mac was booted last. You can use that to calculate the time of
last boot with something like so:
set t to (the ticks) / 60
(current date) - t as date
This will probably have problems on a PowerBook which has been asleep since
its last boot.
Jon
=========================================================================
Date: Thu, 28 Apr 1994 23:35:48 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Dialog box
>Simple question follows. Given a dialog box that comes up with some text
>highlighted and buttons to choose, cancel connect, how do I tell it to
>choose a specific button? Thanks.
I think he's asking how to drive a nonscriptable dialog (probably one which
does SLIP or PPP ;).
Too bad I don't have an answer. :(
Jon
=========================================================================
Date: Thu, 28 Apr 1994 23:35:54 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Scope
>Any advice? Comments? Condescending sniggering?
Scope? Is my breath that bad?
>To give a simple example, look at this script:
>
>set thelist to {"foo", "bar"}
>on open (listoffiles)
> global thelist
> doit()
>end open
>
>on doit()
> global thelist
> display dialog (item 1 of thelist)
>end doit
Put "on run" around the first line and I think it will be more clear. Any
statements outside a handler are implicitly in a run handler and only
executed if you press the run button or run the script some other way (i.e.
double clicking it when saved as an app or chosen from OSA Menu).
>Now, this returns 'thelist is not defined' when run. However, if I were to
>do
>--
>set thelist to { "foo", "bar"}
>doit()
>on doit()
>global thelist
>display dialog (item 1 of thelist)
>end doit
>--
>
>This works fine, and I get 'foo'.
>
>Now, clearly, I'm missing something about the scope of thelist here. I need
>to find a way to tell doit() what thelist is, and while I did originally
>figure I could just define thelist inside the 'on open' subroutine and give
>it to all the subroutines, this seems rather wasteful and does seem to cause
>some slowing ...
The proper thing to do is use a property. Instead of your set command, use:
prop theList : {"foo", "bar"}
This will initialize theList at compile time, make it available to all
handlers within the script, and save the value of theList if you change it.
Cool, huh?
Jon
=========================================================================
Date: Thu, 28 Apr 1994 23:44:21 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Dialog Box
>>Simple question follows. Given a dialog box that comes up with some text
>>highlighted and buttons to choose, cancel connect, how do I tell it to
>>choose a specific button? Thanks.
>I think he's asking how to drive a nonscriptable dialog (probably one which
>does SLIP or PPP ;).
>Too bad I don't have an answer. :(
D'oh!
As soon as I mailed that I realized that the answer I know of is QuicKeys
3.0 which can be called from AppleScript. It's fairly easy too. Record
your QK script which pushes the buttons from the Script Editor and call
that from your more complete and functional script.
It's getting late. ;)
Jon
=========================================================================
Date: Fri, 29 Apr 1994 09:57:21 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: Re: MS: MIME Headers
>Eudora users who submit postings to MACSCRPT should send the command
> SET FULLHRD ON
Well, I like Eudora, but not THAT much!!! ;)
I believe Andy meant:
SET FULLHDR ON
^^^
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Fri, 29 Apr 1994 06:59:55 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Problem--AppleScript in HyperCard
Here's a cautionary tale. In this case it doesn't matter, as is indicated
by the fact that the name of the stack is "JWB Play".
Given a HyperCard 2.2 script (in some object), written in the AppleScript
language. In a handler, we find:
tell application "UserLand Frontier "
....
end tell
But, recently, I stopped running "UserLand Frontier ", in favor of
"UserLand Frontier PowerPC".
Today, I tried to open that script (to find one I was looking for). So
AppleScript's scripting component asked me 'Where is "UserLand Frontier "?
Since it wasn't around, I had to cancel. At which point HyperCard
complained that it couldn't open the script.
So I can't edit the script to change Frontier's name. [I'll either change
Frontier's name long enough to open the script, change Frontier's name
permanently, or play around setting the button's script property (which
will be the least efficient possible fix).
It's an interesting situation (and suggests that HyperCard is lax about
keeping script context information, or something...AppleScript Script
Editor isn't bothered by such a change...if it can't find the app by name
it looks for it by signature, and changes the text of the script
accordingly).
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 29 Apr 1994 09:05:57 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: MS: MIME Headers
In-Reply-To: Your message of "Fri, 29 Apr 94 09:57:21 EDT"
>>Eudora users who submit postings to MACSCRPT should send the command
>> SET FULLHRD ON
>
>Well, I like Eudora, but not THAT much!!! ;)
>
>I believe Andy meant:
>
>SET FULLHDR ON
> ^^^
I got
SET MACSCRPT FULL
^^^^^^^^
to work a little better. :-)
pf
=========================================================================
Date: Fri, 29 Apr 1994 11:43:17 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Leo <mleo@ENIAC.SEAS.UPENN.EDU>
Subject: Re: Dialog Box
>>>Simple question follows. Given a dialog box that comes up with some text
>>>highlighted and buttons to choose, cancel connect, how do I tell it to
>>>choose a specific button? Thanks.
>
>>I think he's asking how to drive a nonscriptable dialog (probably one which
>>does SLIP or PPP ;).
>
>>Too bad I don't have an answer. :(
>
>D'oh!
>
>As soon as I mailed that I realized that the answer I know of is QuicKeys
>3.0 which can be called from AppleScript. It's fairly easy too. Record
>your QK script which pushes the buttons from the Script Editor and call
>that from your more complete and functional script.
>
>It's getting late. ;)
>
>Jon
Thanks that is what I had intended in the way of the dialog box, but I
don't have Quick Keys yet, so I just used the Autotype addition to call a
return.
LEO
=========================================================================
Date: Fri, 29 Apr 1994 13:15:05 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Chris Brannon <cbrannon+@PITT.EDU>
Subject: Cheapest way to get AS 1.1
I've seen several comments regarding upgrades to AS 1.1, so I figured I'd
repost this information, which I picked up from the list a while back.
You can order the 1.1 update to Danny Goodman's Complete AppleScript
Handbook for $4.75 (no shipping). It includes AS 1.1, the latest script
editor, the Frontmost runtime extension and some help files.
As far as I can tell, it doesn't matter if you actually own the book (they
certainly didn't ask when I upgraded).
You can get in touch with Random House at 800-733-3000 (or 212-572-6045).
The ISBN number is 0-679-75537-3.
Regards,...Chris
+--------------------------------------------------------------------------
Christopher B. Brannon University of Pittsburgh
cbrannon+@pitt.edu THE*TRUTH*IS*OUT*THERE Political Science
=========================================================================
Date: Fri, 29 Apr 1994 16:01:35 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George R. Brown" <gbrown@PARTECH.COM>
Subject: Applescript substring problem
I'm having a problem with the following script. Look at the ***'d lines:
tell application "Eudora1.4.2"
set theAddressee to ""
set theAddressor to "george"
set theSubject to "Attached documents..."
tell application "Scriptable Text Editor"
set prefFile to open file =AC
"System Folder:Preferences:Send Attach Preferences"
repeat with i from 1 to count of lines of file prefFile
set str to (line i of file prefFile) as string
if str contains "From:" then
set theAddressor to word 2 of str
else if str contains "Subject:" then
--******************************************=
*
--set x to (offset of ": " in str as string)=
+2
-- ^^^^^^ returns compile error:
-- can't get ":" in str.
-- Access not allowed
--******************************************=
*
set theSubject to (characters (1) =AC
thru (number of characters in str) of
str) as string
else if str contains "To:" then
set theAddressee to word 2 of str
end if
end repeat
end tell
if theAddressee is empty then
set theResult to display dialog "Send to:" default answer =
=AC
"" buttons {"OK", "Cancel"} default button "OK"
set theButton to the button returned of theResult
set theAddressee to the text returned of theResult
else
set theButton to "OK"
end if
if theButton is not "Cancel" then
set theMessage to make InsertHere end of mailbox "Out" of
mail folder "" ObjectClass message
set mbID to number of message of mailbox "Out" of mail=
folder ""
tell theMessage
set toWhom to theAddressee
set field "Subject" to theSubject
set field "From" to theAddressor
set field "To" to theAddressee
--set field "X-Attachments" to docList
--set field "" to "Attachments: " & docList
end tell
queue theMessage QueueType 0
end if
end tell
- gb (george@partech.com)
=========================================================================
Date: Fri, 29 Apr 1994 16:09:08 EDT
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
Subject: MS: MIME II
Another note from the powers that be. Sorry for the confusion.
-A
-------
>Shouldn't the fix for MIME headers indicate the list?
Ooops. Your right, the FULLHDR option is on a list-by-list basis, not
server wide, so the right syntax is indeed:
SET MACSCRPT FULLHDR
Sorry.
=========================================================================
Date: Fri, 29 Apr 1994 16:38:41 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Stephen Jonke <jonke@GSFC.NASA.GOV>
Subject: App to run script at shutdown?
Does anyone know of an application that lets you create a "shutdown
script"? A script that runs when you restart or shutdown your Mac?
Steve
---------------------
jonke@gsfc.nasa.gov
---------------------
=========================================================================
Date: Fri, 29 Apr 1994 16:41:31 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "George R. Brown" <gbrown@PARTECH.COM>
Subject: Debugging applescripts
Being a new AppleScripter, how do you debug scripts? "They" talk about the
similarities between AppleScript and HyperCard but there certainly isn't
the debugger that HyperCard has (unless I'm missing something). Can you
display the value of variables, set break-points, etc?
- gb (george@partech.com)
=========================================================================
Date: Fri, 29 Apr 1994 16:48:44 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Laurent Daudelin <laurent@PLANON.QC.CA>
Subject: Applet & Droplet [REPOST]
Hi all!
Sorry to repost, I miss any answer because I was temporarely removed from the
list :-(
So, here it goes again:
I just begun to take a look at AppleScript and have a question.
I'm using AppleScript 1.0, found in the AV Macs.
I tried to use a script already posted here, to automatically do binhex
translation of a file, using Stuffit Lite.
The script check syntax is ok. The problem is I don't have the choice to save
it as a drop-in application, in Script Editor. I opened some drop-in applet,
and when I want to save them, the option for a droplet appears in the dialog,
but not when I want to save my script. Is there anything I'm missing here? I
suppose yes....
On a related topic, what do you get when you buy the AppleScript user-version
from APDA? Any doc? Is there any electronic documentation about the basics
of AppleScript? I've search the latest bookmark CD, but found nothing.
Any help very appreciated!
Laurent.
---
******************************************************************
Laurent Daudelin, Software Engineer
Planon TELEXPERTISE Inc., Boucherville, Quebec, CANADA
laurent@planon.qc.ca <-- NeXTMail welcome! (Mac Mail welcome too!)
=========================================================================
Date: Fri, 29 Apr 1994 15:57:08 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Debugging applescripts
In-Reply-To: Your message of "Fri, 29 Apr 94 16:41:31 EDT"
George,
>Being a new AppleScripter, how do you debug scripts? "They" talk about the
>similarities between AppleScript and HyperCard but there certainly isn't
>the debugger that HyperCard has (unless I'm missing something). Can you
>display the value of variables, set break-points, etc?
No, not within the Script Editor. However, you can display variables in dialog
boxes using the display dialog scripting addition and you can sprinkle beeps
through your scripts to get "audio traces." If you have access to the
AppleScript beta CD, there was a scripting addition on it called Show
Variables which would display a modal window with variables in it.
On the up side of things, Mark Alldritt is working on a Script Debugger that
looks pretty good, and Main Event Software is also preparing a
beginner/developer environment called Scripter. Both programs will make
scripting easier.
pf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
=========================================================================
Date: Fri, 29 Apr 1994 16:54:00 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Comments: Warning -- original Sender: tag was ross@BNR.CA
From: ab026@FREENET.CARLETON.CA
Subject: Re: Menu Events
Matthew Ahrens writes:
>I'm not sure if this is what you were talking about, but I wrote a
>script to be able to easier use Menu Events. Normally, you are supposed
>to use ResEdit to paste the aete into the app you wish to control. i
>don't know about you, but to me this is a pain in the butt.
Yeah, it *was* a pain until I added a proper scripting addition file in
version 1.1.1. Version 1.1.2 is now current; you can get it from
ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
The package includes a sample script. No more ResEdit.
Ross Brown - AWOL Software Productions
PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
publisher of AWOL Utilities - "the best deal in freeware!"
ab026@freenet.carleton.ca
=========================================================================
Date: Fri, 29 Apr 1994 13:58:12 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: Debugging applescripts
>Being a new AppleScripter, how do you debug scripts? "They" talk about the
>similarities between AppleScript and HyperCard but there certainly isn't
>the debugger that HyperCard has (unless I'm missing something). Can you
>display the value of variables, set break-points, etc?
>
> - gb (george@partech.com)
I agree, the debugging tools for AppleScript are just not there yet.
I use statements such as:
display dialog "marker #1"
to step through the code to see which statement is failing.
I have found that the Apple Script Editor gives much better error messages
than does FaceSpawn or FrontMost or whatever they call it. I am developing
in FaceSpawn so that I have some user interface.
The most difficult part I have is in figuring out how the data in a
variable looks so that I can parse it and do something with it to give it
to the next statement.
Good luck, remember, HyperCard initially didn't have debuggers and variable
watchers either.
Kee nethery
=========================================================================
Date: Fri, 29 Apr 1994 16:46:45 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bill Johnston <johnston@ME.UDEL.EDU>
Subject: Can a script-applet run in background?
I have written a short script that mounts an AFPServer, copies
the contents of the mounted folder/volume to another disk, then
deletes the copied files. The copy and delete are done using
the appropriate osaxen from Jon's commands.
My problem: I'd like this to happen in the background for the
machine running the script, but I can't bring another app
(already open) to the foreground once I start the script.
If I change the script so as to activate the Finder some
time during execution, I can switch apps, but then the script
sits in the background apparently doing nothing until it dies
with an "Apple event timed out" error message. Is this normal,
or have I messed up somewhere? It's 7.0.1* on a IIx running
AS 1.1.
Here's the script, in case anyone is interested in the
server-related stuff:
try
list nodes
if (the result contains "wdjUs Macintosh:AFPServer@*") is false then
display dialog "Please turn on FileSharing on wdj's Mac!" buttons
{"OK"} default button "OK" with icon stop
else
list disks
if (the result contains "Downloads") is false then
MountVolume Zone "*" Server "wdjUs Macintosh" Volume "Downloads"
end if
set inputFolderPath to "Downloads:"
set fileList to list folder inputFolderPath
set destFolder to "HD0:Downloads:"
set destFolderContents to list folder destFolder
set skippedFiles to "" as string
repeat with index from 1 to the number of items in fileList
set theFile to item index of fileList
if destFolderContents contains theFile then
-- skip it, and warn user
beep
set skippedFiles to (skippedFiles & theFile & return)
else
set inputFilePath to inputFolderPath & theFile
copyFile inputFilePath to destFolder without replacing
deleteFile inputFilePath
end if
end repeat
if skippedFiles is not "" then
display dialog ("Won't clobber " & return & skippedFiles) buttons
{"OK"} default button "OK"
end if
end if
on error errorText
beep
display dialog errorText buttons {"OK"} default button "OK" with icon stop
end try
-- Bill Johnston (johnston@me.udel.edu)
-- 38 Chambers Street; Newark, DE 19711; (302)368-1949
=========================================================================
Date: Fri, 29 Apr 1994 17:11:18 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bill Johnston <johnston@ME.UDEL.EDU>
Subject: Re: App to run script at shutdown?
In-Reply-To: <9404292043.AA15583@me.udel.edu>
Not an app, but how about the Shutdown FX init?
Bill
-- Bill Johnston (johnston@me.udel.edu)
-- 38 Chambers Street; Newark, DE 19711; (302)368-1949
=========================================================================
Date: Fri, 29 Apr 1994 16:13:00 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Applet & Droplet [REPOST]
In-Reply-To: Your message of "Fri, 29 Apr 94 16:48:44 EDT"
Everyone,
>Sorry to repost, I miss any answer because I was temporarely removed from the
>list :-(
>
[Sorry, Laurent, I'm not near my Mac and can't remember the response.]
However, if you are ever dropped from the list, you can always find the
digests on
ftp://gaea.kgs.ukans.edu/applescript/docs/digests/
>On a related topic, what do you get when you buy the AppleScript user-version
>from APDA? Any doc? Is there any electronic documentation about the basics
>of AppleScript? I've search the latest bookmark CD, but found nothing.
You get the AppleScript Language Guide, the Getting Started Guide, and the
Scripting Additions Guide. You'll find the HyperCard stack Language at a
Glance in
ftp://gaea.kgs.ukans.edu/applescript/docs/Language_at_a_Glance.sit.hqx
pf
=========================================================================
Date: Fri, 29 Apr 1994 14:28:54 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: David Ray <daver@NETCOM.COM>
Subject: Re: Dialog Box
>>>Simple question follows. Given a dialog box that comes up with some text
>>>highlighted and buttons to choose, cancel connect, how do I tell it to
>>>choose a specific button? Thanks.
>
>As soon as I mailed that I realized that the answer I know of is QuicKeys
>3.0 which can be called from AppleScript. It's fairly easy too. Record
>your QK script which pushes the buttons from the Script Editor and call
>that from your more complete and functional script.
>
>It's getting late. ;)
>
>Jon
Another less expensive option is the AutoType osax (shareware). You can always
use it to click on the highlighted button (with 'enter' or 'control-m'), and
in some cases control other buttons (when they have command-key equivalents).
I managed to write a scipt to control Fetch to enter passwords and 'put'
files using these techniques.
-Dave
daver@netcom.com
=========================================================================
Date: Fri, 29 Apr 1994 14:36:00 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: Debugging applescripts
>Being a new AppleScripter, how do you debug scripts? "They" talk about the
>similarities between AppleScript and HyperCard but there certainly isn't
>the debugger that HyperCard has (unless I'm missing something). Can you
>display the value of variables, set break-points, etc?
You can (1) look at what the target application does about what you tell it
to do;
(2) display dialogs at key points (if the key values you care about can
be made into strings)
(3) see the result of the last operation executed in the result window
(it does a little better about what it can manage to show you)
[Or you can switch to Frontier, whose debugging support lets you single
step, look at variables, change variables and do other interesting
debugging stuff. But only for UserTalk scripts, not for AppleScript ones
you happen to write in the Frontier editor.]
--John
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 29 Apr 1994 14:42:23 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Edmund Lai <lai@APPLE.COM>
Subject: Re: AS Interpreter
>Or you can just type stuff into a field in HyperCard and execute it at the
>press of return or enter or whatever you choose.
>
>My Messenger application has that AS feature. Messenger is for one-to-one
>chatting over AppleTalk LANs, but you can also type AppleScript commands
>and select "Do AppleScript Commands" from the AS menu.
>
>Messenger was written in HyperCard 2.1 and 2.2, is a stand-alone
>application, and is available at sumex-aim, umich and all their mirrors.
>
>-DM
>
>
It really takes very little effort to write a message box that you can
type in AppleScript commands and execute it. All it takes is a few OSA
calls. It was planned that way so that one can easily write and execute
a script from anywhere.
The fact it can be easily done does not mean that it will be done.
Right now you can only do it from applications that can be considered
to be scripting utilities. So it would be nice if there is a way to do
a universial message box without making any changes to the applications.
Actually there are Mac toolbox manager that were never meant to be used
for scripting that can be helpful. That is the Text Service Manager (TSM)
which is used for input method of Chinese and Japanese system. The two
seem completely unrelated, so it is not a perfect fit to use the TSM for
AppleScript message box, and it is difficult to convince people that TSM
should be modified so that it can serve the purpose of being used as an
AppleScript message box. For one thing this means that it would only work
under the the Chinese or Japanese OS. This is not a problem for me since
I do have the Chinese OS installed for my own machine, but very few others
have.
Why is the TSM useful for a message box? TSM provides floating window
which is above every application layer which is ideal for message box.
It can be invoked from about any application doing text input and allows
the choice of a font, and that covers lots of applications. TSM provides
a system wide menu on the right hand side of the menu bar and that is
ideal for a script menu. TSM listens to low level events such as
keystrokes and reports them to the "input methods" so it has the
potential to be used for low level recording. It is unfortunate that
it is not being taken advantage of.
Anyway I have experiment with using TSM as an message box. I have
been working on a Chinese input method on my spare time and it is
only a slight diversion to also use it as a message box. It is not
perfect. Since normally it is a Chinese input method, it would
treat you AppleScript statement as input for Chinese and try to
turn it into Chinese, sometimes with very funny result. At the
end you need to execute from the menu to tell the input method
that what you typed in is not Chinese input but it is AppleScript
statement. Also since I connect and disconnect from AppleScript
for each execution, it potentially load and unload AppleScript
every time so it is very slow unless you force AppleScript to
stay loaded by having Script Editor running. It is really an
experiment rather than the real thing but the bottom line is
that it works.
Note that this is different from having a "message box" in HyperCard
and talking to another application. The message box is right inside
the application and talking to the application directly, so there
is no need to have "tell application x". I have only tried it
on the Scriptable Text Editor, from this message box you can type
and execute statement like
select word 4 of window 1
or
delete word 1 through 5 of window 1
or
current date as string
The last command returns a result and it will be put back into the
current selection of the document.
In this way potential every application can have a message box like
HyperCard that you can use to talk to the application.
It would be interesting to do it to the scriptable finder, however
Chinese input is disabled in the Finder. I think I may need to do
it to a Chinese version of the Finder.
What we have been doing with scripting just touches the surface,
the potential is unlimited.
/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai */
/* Apple Computer, MS303-3A */
/* 20525 Mariani Ave, */
/* Cupertino, CA 95014 */
/* (408)974-6272 */
zW@h9cOi
/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai */
/* Apple Computer, MS303-3A */
/* 20525 Mariani Ave, */
/* Cupertino, CA 95014 */
/* (408)974-6272 */
zW@h9cOi
=========================================================================
Date: Fri, 29 Apr 1994 16:42:06 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Steve Michel <michel@NETCOM.COM>
Subject: Re: Applescript substring problem
George,
Your problem is coming because Offset is a property used by Scriptable Text
Editor. So, when you want to use the Offset Scripting Addition inside a
tell block for the Scriptable Text Editor, you have to use "my" to make
sure the OSAX is used, and not the STE property. Change the offending line
to read:
set x to (my offset of ": " in str)
and it compiles fine (or did for me).
Steve
=========================================================================
Date: Fri, 29 Apr 1994 21:05:47 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Steven L. Rohall" <slrohall@TASC.COM>
Subject: Eudora event to Frontmost?
I was trying to have Eudora notify a Frontmost application. I started by
using a code fragment that worked fine from the Script Editor. Namely,
after telling Eudora which application it should notify, I had a handler
that looked something like:
on <<event CSOmeNot>> msgList
copy (count of items in msgList) to newMsgs
beep newMsgs
end <<event CSOmeNot>>
However, in my Frontmost application it seems as if it never gets the
event. Is there any reason why the application shouldn't get the event? I
wasn't getting any errors, either. Is the problem the aete resource in the
Frontmost app (which doesn't exist in the apple script app? Thanks,
-Steve.
+--------------------------------------------------------------+
| Steven L. Rohall |
| ________ _ ______ ______ |
| 55 Walkers Brook Drive / / \ / / / / |
| Reading, MA 01867-3297 / /___\ /______ / |
| Tel: (617)942-2000 / / \ // |
| Fax: (617)942-7100 / / \/______//______/ |
| slrohall@tasc.com |
| (MIME-conformant mail welcome.) |
+--------------------------------------------------------------+
=========================================================================
Date: Fri, 29 Apr 1994 21:21:40 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Steven L. Rohall" <slrohall@TASC.COM>
Subject: Re: Eudora event to Frontmost?
Earlier I said:
>I was trying to have Eudora notify a Frontmost application. I started by
>using a code fragment that worked fine from the Script Editor. Namely,
>after telling Eudora which application it should notify, I had a handler
>that looked something like:
>
>on <<event CSOmeNot>> msgList
> copy (count of items in msgList) to newMsgs
> beep newMsgs
>end <<event CSOmeNot>>
>
...
I should note that if my Frontmost app is not running when Eudora tries to
send the event, my app will be launched--so it looks like the event is
getting there. But, my handler doesn't seem to be getting called. Is the
event being caught somewhere else?
-Steve.
=========================================================================
Date: Fri, 29 Apr 1994 19:43:46 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "John W. Baxter" <jwbaxter@OLYMPUS.NET>
Subject: Re: App to run script at shutdown?
>Does anyone know of an application that lets you create a "shutdown
>script"? A script that runs when you restart or shutdown your Mac?
One of the almost hidden extras on the AppleScript 1.1 Developer Kit is an
extension which enables a Shutdown Items folder (a sibling of the Startup
Items folder). The brief note in the readme suggests that it operates at
shutdown time the way Startup Items does at startup time. [Before, one
hopes, Finder concludes that it has managed to shut everyone down.]
Said to work with System 7.1 and later. Likely part of the base release in
7.5.
--John (who wonders how many CDs it will take to hold System 7.5...)
--
jwbaxter@pt.olympus.net (John W. Baxter) Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).
=========================================================================
Date: Fri, 29 Apr 1994 21:57:43 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kelly A Campbell <camel@CIS.KSU.EDU>
Subject: jon's commands question
In-Reply-To: <199404300151.UAA21950@depot.cis.ksu.edu> from "George R. Brown"
at Apr 29, 94 04:41:31 pm
I saw something about Jon's cammands on here, and I was wondering
what that was exactly. I checked at gaea, but didn't find anything there.
Thanks,
Kelly
--
,---------------------------------------------------------.
| Kelly A. Campbell | Kansas State University |
| camk@ksu.ksu.edu | Student Publications |
| camel@cis.ksu.edu | Macintosh Tech Support |
`---------------------------------------------------------'
=========================================================================
Date: Fri, 29 Apr 1994 20:02:36 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jon Pugh <jonpugh@NETCOM.COM>
Subject: Re: Stuff
>My next thing to look for is a way to access dictionaries from a
>script.
I have a set of half+ completed osaxen that will do this. They support the
Get Event Info, Get Class Info, Get Suite Info, & Get Enumeration Info
events. They work by parsing the aete and returning records with the
corresponding info. I haven't had a chance to work on it for a while and
was wondering if people really wanted this functionality. It was
originally intended to be part of AppleScript, but it was deemed marginally
useful (No one's going to want to get a dictionary from a script) and thus
dropped. My plan is to complete them, but it's fairly low on my list.
>I'm aware that some of what I'd like to do might be doable
>using the scriptable text parsing of a MacPerl, but launching
>that is overkill for the current project, in which I'd like
>to parse the result of "current date" to build a string like
>"940427" to append to the name of a backup file.
This is on my list too, but higher up. I'm planning a formatted date osax
which will allow you to specify a string and get a date in that format.
Jon
=========================================================================
Date: Fri, 29 Apr 1994 22:23:12 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Jonathan Bauer <jhbauer@PANIX.COM>
Subject: Re: Mail document to person as Eudora Attachment
>The attached file is an applet that takes any file droped onto it and mails
>it off to the person specified in the file. I would change it to a bogus
>email address as the default, except something seems to have happened to my
Of course I don't really know what I'm doing, so take with a grain (or ton)
of salt, but when I double click your attachment I get the following error:
Could not run the script "Mail to Peter" because the
script's data format is too new for the scripting format
to read it.
-1759
What does this mean??
thanks,
/jonathan
----------------------------------
Jonathan Bauer <jhbauer@panix.com>
440 W. 41st St. #202
N.Y. N.Y. 10036
+1 212-239-5158
=========================================================================
Date: Sat, 30 Apr 1994 15:39:39 +0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
Subject: Re: Mail document to person as Eudora Attachment
> Could not run the script "Mail to Peter" because the
> script's data format is too new for the scripting format
> to read it.
> -1759
>
>What does this mean??
I think it is apple's way of telling you that someone else has received a
bundled copy or spent the dollars for Applescript 1.1 and now it is your
turn to do the same :-(
There was a message that went through with an improved salt-free version of
the script. I suspect that just copying that text would be a better way of
doing it.
What is the concensus people? Was my posting the applet a mistake? Should
I in the future cut and paste the script? Is this is the FAQ which I
probably haven't read? Can anyone see a good reason to post the applet?
Craig
--
Craig Richmond, Computer Officer, ECEL Computing Services +61 9 380 1405
The University of Western Australia or 380 3860 Email for FAX Number
craig@ecel.uwa.edu.au Dvorak Keyboards RULE! "Messes are only acceptable
if users make them. Applications aren't allowed this freedom" I.M.VI 2-4
=========================================================================
Date: Sat, 30 Apr 1994 11:08:54 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Michael Kilgore <mak@TICIPA.WORKS.TI.COM>
Organization: Texas Instruments, Inc.
Subject: Re: Mail document to person as Eudora Attachment
>[...] Was my posting the applet a mistake? Should
>I in the future cut and paste the script?
Well, I guess there are times when the script is not enough, such as when
the applet has resources; so in principle people should send whatever is
needed to illustrate the problem.
But my preference would be for a wrapper, such as a .sit file, around the
real material. It was a little startling to have SAM suddenly announce to
me that something wanted to create an app; having a wrapped file would
allow me to defer that decision. (But my reaction may be because I haven't
adapted yet to what MIME can do for me, or because I'm not configuring
Eudora to best advantage; so feel free to discount the suggestion.)
--
Michael Kilgore (214)917-2219
=========================================================================
Date: Sat, 30 Apr 1994 13:10:37 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
Subject: Re: Exporting Records
In-Reply-To: <no.id> from "Roy Rapoport" at Apr 28, 94 06:02:04 pm
--Roy Rapoport wrote:
>
>Exporting Records
>Anyone know of a way for AppleScript to tell FileMaker Pro to export found
>records into a file?
Not directly. There is no export AS command for FM Pro. What you can
do is have a FM script that exports data and then call that script with
a do script command, but this isn't very flexable.
-Hades
=========================================================================
Date: Sat, 30 Apr 1994 10:21:38 -0700
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Mike Cohen <isis@NETCOM.COM>
Subject: Re: Mail document to person as Eudora Attachment
In-Reply-To: <199404301717.KAA29776@mail.netcom.com> from "Michael Kilgore" at
Apr 30, 94 11:08:54 am
>
> >[...] Was my posting the applet a mistake? Should
> >I in the future cut and paste the script?
>
> Well, I guess there are times when the script is not enough, such as when
> the applet has resources; so in principle people should send whatever is
> needed to illustrate the problem.
>
> But my preference would be for a wrapper, such as a .sit file, around the
> real material. It was a little startling to have SAM suddenly announce to
> me that something wanted to create an app; having a wrapped file would
> allow me to defer that decision. (But my reaction may be because I haven't
> adapted yet to what MIME can do for me, or because I'm not configuring
> Eudora to best advantage; so feel free to discount the suggestion.)
>
> --
> Michael Kilgore (214)917-2219
>
I was a little surprised when I double-clicked it assuming it was a .SEA file
(I don't have my downloads window view by icons). BTW, I've improved it
slightly to allow a recipient and short message to be entered.
--
Mike Cohen | "Software that means business"
ISIS International |
(818) 788-4747 Voice | isis@netcom.com | ALink: D6734
(818) 501-0653 Fax | NewtonMail, eWorld: MikeC | AOL: MikeC20
=========================================================================
Date: Sat, 30 Apr 1994 10:24:34 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
Subject: Re: Mail document to person as Eudora Attachment
>What is the concensus people? Was my posting the applet a mistake? Should
>I in the future cut and paste the script? Is this is the FAQ which I
>probably haven't read? Can anyone see a good reason to post the applet?
I concur with the idea of putting it in a wrapper such as stuffit. I too
was a bit surprised to see an applet appear on my hard drive.
Kee Nethery
_________________________________________________________________
Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
=========================================================================
Date: Sat, 30 Apr 1994 11:12:53 -0800
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Ed Lai <lai@APPLE.COM>
Subject: Scriptable fractal program
This is from comp.sys.mac.apps, it sounds interesting to this group. Can
someone who has access to AOL or CompuServe download it and make it
available for ftp?
******************************************
Listed below is the release information for Color Fractal Generator 2.1. This
is a fractal program which provides extensive support for Frontier and
AppleScript, permitting users to automate searches and even create fractal
movies through scripting (it also creates beautiful fractal images). This
program is available on America Online, CompuServe, and Ziff-Net Mac. I do not
have access to ftp to upload this to Internet. The program is Shareware
(registration fee $15). You may obtain the THINK C source code for $40. The
registration fees may be sent to:
John A. Schlack
824 Rhoads Avenue
Jenkintown, Pa. 19046.
Send me E-mail if you have additional questions or comments (John40@aol.com).
----------------------------------------------------------------
Color Fractal Generator 2.1 is a major upgrade of the previously released
versions. Scripting support has been added including an extensive set of
verbs, shared menus, and a quick script utility. In addition to native CFG
palettes, this program can load palettes from resources of type 'clut' and
'pltt'. One may select the floating point display precision, anywhere from 3
to 18 digits. Additional standard window sizes have been added to the Size
menu. The coloring method for 4 and 8 bit systems has been dramatically
improved.
Other significant features include: support for 4, 8, 16, and 32-bit color,
full background processing, building multiple fractals simultaneously,
palettes, saving a fractal during generation and then restarting where left off
(registered users), both a help dialog providing extensive online support and
balloon help for quick reminders, System 7.0 features, and support for
computers with and without math coprocessors.
This program generates beautiful color Mandelbrot, Julia, Dragon, and Random
Walk fractals and provides near unlimited maneuvering through the fractal
world. The program requires a Mac with Color QuickDraw, 16+ color monitor, and
System 6.05 or later (including System 7.0). System 6.0x requires MultiFinder.
The program can run in 32-bit addressing mode.
Scripting is now the most prominent feature of CFG. This program has the
appropriate code to handle both AppleScript and UserLand Frontier. Using the
scripting capabilities is definitely not required to generate great fractals
using CFG, but it does provide the user with the ability to extend the power of
this program. One can write scripts to provide simple utilities that make CFG
easier to use (such as the Stack Windows sample script), automate the
exploration of the fractal universe, or even create fractal movies.
You also have an opportunity to obtain the FULL SOURCE CODE in THINK C 6.0
format. Download the product for more information.
This version of the program cannot save fractal graphics. Saving the images is
a feature added when the user registers. Please note that the fractal's
parameters may be saved permitting recreation of the fractal at any time.
******************************************
/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai */
/* Apple Computer, MS303-3A */
/* 20525 Mariani Ave, */
/* Cupertino, CA 95014 */
/* (408)974-6272 */
zW@h9cOi
=========================================================================
Date: Sat, 30 Apr 1994 18:20:07 -0400
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
Subject: Writing OSAXen
Are there any docs on how to write an OSAX, other than the docs presumably
sold by Apple?
Bob
--
Bob Snyder N2KGO MIME, RIPEM mail accepted
snyderra@dunx1.ocs.drexel.edu finger for RIPEM public key
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
=========================================================================
Date: Sat, 30 Apr 1994 17:24:42 -0500
Reply-To: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
Sender: Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
From: Fred Terry <pfterry@LKS.CSI.COM>
Subject: Re: Scriptable fractal program
In-Reply-To: Your message of "Sat, 30 Apr 94 11:12:53 -0900"
Ed Lai writes .....
>This is from comp.sys.mac.apps, it sounds interesting to this group. Can
>someone who has access to AOL or CompuServe download it and make it
>available for ftp?
>
>******************************************
>
>Listed below is the release information for Color Fractal Generator 2.1. This
>is a fractal program which provides extensive support for Frontier and
>AppleScript, permitting users to automate searches and even create fractal
>movies through scripting (it also creates beautiful fractal images). This
>program is available on America Online, CompuServe, and Ziff-Net Mac. I do no
>t
>have access to ftp to upload this to Internet. The program is Shareware
>(registration fee $15). You may obtain the THINK C source code for $40. The
You'll find it on gaea.kgs.ukans.edu in
ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/CFG2.1UR.sit.hqx
Enjoy.
pf